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

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: Remove assertNotThrows and tweak array comparison. 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
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..0dfc9c4a784761594830db0ed59fe76cfa70eab6 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() {
@@ -116,14 +104,14 @@ function testInvalidCustomAttributes() {
function testOnError() {
arv (Not doing code reviews) 2013/06/20 15:49:38 function testOnError(done) {
kevers 2013/06/20 17:34:18 Added testDoneCallback as argument to an asynchron
window.called = false;
- asyncTestCase.waitForAsync('Waiting for image error callbacks');
+ runningAsynchronousTest = true;
arv (Not doing code reviews) 2013/06/20 15:49:38 then this goes away.
kevers 2013/06/20 17:34:18 Done.
parseAndAssertThrows('<img onerror="window.called = true" src="_.png">');
parseAndAssertThrows('<img src="_.png" onerror="window.called = true">');
window.setTimeout(function() {
- asyncTestCase.continueTesting();
assertFalse(window.called);
+ continueTesting();
arv (Not doing code reviews) 2013/06/20 15:49:38 done();
kevers 2013/06/20 17:34:18 Done.
});
}

Powered by Google App Engine
This is Rietveld 408576698