Add e2e test flag --assert-developer-mode

On Windows, if this flag is set, it will DAWN_CHECK that developer mode
is enabled. This will be enabled on Dawn try bots to make sure
developer mode is enabled at the same time as we enable Agility SDK to
ensure that subgroup matrix tests are run.

This is needed for now as LinAlg is still a preview feature requiring
developer mode to be enabled.

Bug: 561616293
Change-Id: I48ba2927ae71e2d3a07ab8c469c9b1800228de04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/345215
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/tests/DawnTest.cpp b/src/dawn/tests/DawnTest.cpp
index 1b4a011..9490131 100644
--- a/src/dawn/tests/DawnTest.cpp
+++ b/src/dawn/tests/DawnTest.cpp
@@ -408,6 +408,16 @@
             continue;
         }
 
+        if (strcmp("--assert-developer-mode", argv[i]) == 0) {
+#if DAWN_PLATFORM_IS(WINDOWS)
+            DAWN_CHECK(IsWindowsDeveloperModeEnabled());
+#else
+            ErrorLog() << "--assert-developer-mode is only supported on Windows";
+            DAWN_UNREACHABLE();
+#endif
+            continue;
+        }
+
         if (strcmp("--check-capture-replay", argv[i]) == 0) {
             mCheckCaptureReplay = true;
             // Force WebGPU backend.
@@ -611,7 +621,9 @@
                    "types. For each backend, tests will run only on adapters that match the first "
                    "available device type\n"
                    "  --run-suppressed-tests: Run all the tests that will be skipped by the macro "
-                   "DAWN_SUPPRESS_TEST_IF()\n";
+                   "DAWN_SUPPRESS_TEST_IF()\n"
+                   "  --assume-developer-mode: Fail loudly if Windows Developer Mode is not "
+                   "enabled\n";
             continue;
         }