| <script src="/js-test-resources/js-test.js"></script> |
| <script src="resources/util.js"></script> |
| description("Test for enabling debug mode and that it permanently treats 3rdpartytestwebkit.org as a prevalent resource."); |
| const thirdPartyOrigin = "http://3rdpartytestwebkit.org"; |
| if (window.testRunner && window.internals) { |
| setEnableFeature(true, function() { |
| if (testRunner.isStatisticsPrevalentResource(thirdPartyOrigin)) |
| testFailed(thirdPartyOrigin + " already set as prevalent resource."); |
| testRunner.setStatisticsDebugMode(true, function() { |
| if (!testRunner.isStatisticsPrevalentResource(thirdPartyOrigin)) |
| testFailed(thirdPartyOrigin + " didn't get set as prevalent resource."); |
| testPassed(thirdPartyOrigin + " got set as prevalent resource in debug mode."); |
| testRunner.setStatisticsDebugMode(false, function() { |
| setEnableFeature(false, finishJSTest); |