Index: chrome/test/data/webui/parse_html_subset_test.html |
diff --git a/ui/webui/resources/js/parse_html_subset_test.html b/chrome/test/data/webui/parse_html_subset_test.html |
similarity index 86% |
rename from ui/webui/resources/js/parse_html_subset_test.html |
rename to chrome/test/data/webui/parse_html_subset_test.html |
index e5b3d531a2240dfa03b9d4f03cfad27dbb8de020..eb3aac3bbf56a473c05ecf0fb4646441e8c3b9a3 100644 |
--- a/ui/webui/resources/js/parse_html_subset_test.html |
+++ b/chrome/test/data/webui/parse_html_subset_test.html |
@@ -2,21 +2,11 @@ |
<html> |
<head> |
<title>parseHtmlSubset test</title> |
-<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js"></script> |
-<script src="parse_html_subset.js"></script> |
-<script> |
- |
-goog.require('goog.testing.AsyncTestCase'); |
-goog.require('goog.testing.jsunit'); |
- |
-</script> |
- |
+<script src="webui_resource_test.js"></script> |
</head> |
<body> |
<script> |
-var asyncTestCase = goog.testing.AsyncTestCase.createAndInstall(); |
- |
function parseAndAssertThrows() { |
var args = arguments; |
assertThrows(function() { |
@@ -26,9 +16,7 @@ function parseAndAssertThrows() { |
function parseAndAssertNotThrows() { |
var args = arguments; |
- assertNotThrows(function() { |
- parseHtmlSubset.apply(null, args); |
- }); |
+ parseHtmlSubset.apply(null, args); |
} |
function testText() { |
@@ -113,17 +101,15 @@ function testInvalidCustomAttributes() { |
parseAndAssertThrows('<a class="fancy">I\'m fancy!</a>'); |
} |
-function testOnError() { |
+function testOnErrorAsync(testDoneCalback) { |
window.called = false; |
- asyncTestCase.waitForAsync('Waiting for image error callbacks'); |
- |
parseAndAssertThrows('<img onerror="window.called = true" src="_.png">'); |
parseAndAssertThrows('<img src="_.png" onerror="window.called = true">'); |
window.setTimeout(function() { |
- asyncTestCase.continueTesting(); |
assertFalse(window.called); |
+ testDoneCalback(); |
}); |
} |