Clean up several TODOs in Dawn tests

This patch resolves several TODOs and removes some other invalid TODOs
in Dawn tests

Bug: dawn:755, dawn:814, dawn:1504, dawn:1684, dawn:1705, tint:1976
Change-Id: Id1cae3bfe538af4accfcd46f2a391d335b32452e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/175945
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/dawn/tests/DawnTest.cpp b/src/dawn/tests/DawnTest.cpp
index 2518bdc..eed7260 100644
--- a/src/dawn/tests/DawnTest.cpp
+++ b/src/dawn/tests/DawnTest.cpp
@@ -1099,8 +1099,6 @@
     mNextIsolationKeyQueue.push(std::move(isolationKey));
 
     // RequestDevice is overriden by CreateDeviceImpl and device descriptor is ignored by it.
-    // Give an empty descriptor.
-    // TODO(dawn:1684): Replace empty DeviceDescriptor with nullptr after Dawn wire support it.
     wgpu::DeviceDescriptor deviceDesc = {};
 
     // Set up the mocks for device loss.
diff --git a/src/dawn/tests/end2end/DeviceInitializationTests.cpp b/src/dawn/tests/end2end/DeviceInitializationTests.cpp
index 9e3f1e1..1034ad7 100644
--- a/src/dawn/tests/end2end/DeviceInitializationTests.cpp
+++ b/src/dawn/tests/end2end/DeviceInitializationTests.cpp
@@ -142,10 +142,6 @@
             if (properties.backendType == wgpu::BackendType::Null) {
                 continue;
             }
-            // TODO(dawn:1705): Remove this once D3D11 backend is fully implemented.
-            if (properties.backendType == wgpu::BackendType::D3D11) {
-                continue;
-            }
             availableAdapterProperties.push_back(std::move(properties));
         }
     }
diff --git a/src/dawn/tests/end2end/MultisampledSamplingTests.cpp b/src/dawn/tests/end2end/MultisampledSamplingTests.cpp
index 4917c4d..3f3771e 100644
--- a/src/dawn/tests/end2end/MultisampledSamplingTests.cpp
+++ b/src/dawn/tests/end2end/MultisampledSamplingTests.cpp
@@ -64,10 +64,6 @@
     void SetUp() override {
         DawnTest::SetUp();
 
-        // TODO(crbug.com/tint/1976): DXC fails to compile the following compute shader because the
-        // coordinate in texture load is not interpreted as an integer vector.
-        DAWN_SUPPRESS_TEST_IF(IsD3D12() && HasToggleEnabled("use_dxc"));
-
         {
             utils::ComboRenderPipelineDescriptor desc;
 
diff --git a/src/dawn/tests/end2end/ShaderValidationTests.cpp b/src/dawn/tests/end2end/ShaderValidationTests.cpp
index 72506e8..0fe683c 100644
--- a/src/dawn/tests/end2end/ShaderValidationTests.cpp
+++ b/src/dawn/tests/end2end/ShaderValidationTests.cpp
@@ -39,7 +39,6 @@
 // The compute shader workgroup size is settled at compute pipeline creation time.
 // The validation code in dawn is in each backend (not including Null backend) thus this test needs
 // to be as part of a dawn_end2end_tests instead of the dawn_unittests
-// TODO(dawn:1504): Add support for GL backend.
 class WorkgroupSizeValidationTest : public DawnTest {
   public:
     wgpu::ShaderModule SetUpShaderWithValidDefaultValueConstants() {
diff --git a/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp b/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp
index 0b9f71a..1abd760 100644
--- a/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp
@@ -224,7 +224,7 @@
     device.CreateComputePipeline(&csDesc);
 }
 
-// TODO(cwallez@chromium.org): Add a regression test for Disptach validation trying to acces the
+// TODO(cwallez@chromium.org): Add a regression test for Disptach validation trying to access the
 // input state.
 
 class ComputeDispatchValidationTest : public ValidationTest {
diff --git a/src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp b/src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp
index 0a9c34f..cfd9bcd 100644
--- a/src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp
@@ -53,7 +53,6 @@
     }
 
     static const char* GetFloatImageTypeDeclaration(wgpu::TextureViewDimension dimension) {
-        // TODO(bclayton): Support and test texture_storage_1d_array
         switch (dimension) {
             case wgpu::TextureViewDimension::e1D:
                 return "texture_storage_1d";
@@ -139,9 +138,11 @@
                                 uint32_t sampleCount = 1,
                                 uint32_t arrayLayerCount = 1,
                                 wgpu::TextureDimension dimension = wgpu::TextureDimension::e2D) {
+        constexpr uint32_t kWidth = 16u;
+        uint32_t height = dimension == wgpu::TextureDimension::e1D ? 1 : kWidth;
         wgpu::TextureDescriptor descriptor;
         descriptor.dimension = dimension;
-        descriptor.size = {16, 16, arrayLayerCount};
+        descriptor.size = {kWidth, height, arrayLayerCount};
         descriptor.sampleCount = sampleCount;
         descriptor.format = format;
         descriptor.mipLevelCount = 1;
@@ -704,11 +705,9 @@
     constexpr wgpu::TextureFormat kStorageTextureFormat = wgpu::TextureFormat::R32Float;
     constexpr uint32_t kDepthOrArrayLayers = 6u;
 
-    // TODO(crbug.com/dawn/814): test the use of 1D texture view dimensions when they are
-    // supported in Dawn.
-    constexpr std::array<wgpu::TextureViewDimension, 3> kSupportedDimensions = {
-        wgpu::TextureViewDimension::e2D, wgpu::TextureViewDimension::e2DArray,
-        wgpu::TextureViewDimension::e3D};
+    constexpr std::array kSupportedDimensions = {
+        wgpu::TextureViewDimension::e1D, wgpu::TextureViewDimension::e2D,
+        wgpu::TextureViewDimension::e2DArray, wgpu::TextureViewDimension::e3D};
 
     wgpu::TextureViewDescriptor kDefaultTextureViewDescriptor;
     kDefaultTextureViewDescriptor.format = kStorageTextureFormat;
@@ -733,9 +732,12 @@
 
             for (wgpu::TextureViewDimension dimensionOfTextureView : kSupportedDimensions) {
                 // Create a texture view with given texture view dimension.
+                uint32_t depthOrArrayLayers =
+                    dimensionOfTextureView == wgpu::TextureViewDimension::e1D ? 1u
+                                                                              : kDepthOrArrayLayers;
                 wgpu::Texture texture =
                     CreateTexture(wgpu::TextureUsage::StorageBinding, kStorageTextureFormat, 1,
-                                  kDepthOrArrayLayers,
+                                  depthOrArrayLayers,
                                   utils::ViewDimensionToTextureDimension(dimensionOfTextureView));
 
                 wgpu::TextureViewDescriptor textureViewDescriptor = kDefaultTextureViewDescriptor;
diff --git a/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp b/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp
index 8769b11..29af037 100644
--- a/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp
@@ -64,12 +64,7 @@
         std::ostringstream vs;
         vs << "@vertex fn main(\n";
         for (unsigned int i = 0; i < bufferCount; ++i) {
-            // TODO(cwallez@chromium.org): remove this special handling of 0 once Tint supports
-            // trailing commas in argument lists.
-            if (i != 0) {
-                vs << ", ";
-            }
-            vs << "@location(" << i << ") a_position" << i << " : vec3f\n";
+            vs << "@location(" << i << ") a_position" << i << " : vec3f,\n";
         }
         vs << ") -> @builtin(position) vec4f {";
 
diff --git a/src/dawn/utils/TextureUtils.cpp b/src/dawn/utils/TextureUtils.cpp
index 4e31847..ff4a93f 100644
--- a/src/dawn/utils/TextureUtils.cpp
+++ b/src/dawn/utils/TextureUtils.cpp
@@ -901,8 +901,8 @@
             return wgpu::TextureDimension::e2D;
         case wgpu::TextureViewDimension::e3D:
             return wgpu::TextureDimension::e3D;
-        // TODO(crbug.com/dawn/814): Implement for 1D texture.
         case wgpu::TextureViewDimension::e1D:
+            return wgpu::TextureDimension::e1D;
         default:
             DAWN_UNREACHABLE();
             break;