Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1597)

Unified Diff: chrome/test/data/webui/parse_html_subset_test.html

Issue 16831021: Convert asynchronous closure test in cr.ui framework to a browser test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge trunk Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/webui/webui_resource_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
});
}
« no previous file with comments | « no previous file | chrome/test/data/webui/webui_resource_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698