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

Unified Diff: chrome/test/data/webui/foo_bar_browsertest.js

Issue 1124873002: Mocha adapter for Polymer browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split out non-mocha stuff Created 5 years, 7 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/foo_bar_browsertest.js
diff --git a/chrome/test/data/webui/foo_bar_browsertest.js b/chrome/test/data/webui/foo_bar_browsertest.js
new file mode 100644
index 0000000000000000000000000000000000000000..53e46625486ef53188cb356d0b3854686715c7e3
--- /dev/null
+++ b/chrome/test/data/webui/foo_bar_browsertest.js
@@ -0,0 +1,35 @@
+// Sample test file, not for checkin.
+
+function FooBarBrowserTest() {}
+
+FooBarBrowserTest.prototype = {
+ __proto__: testing.Test.prototype,
+
+ browsePreload: 'chrome://web-component-test/',
+
+ isAsync: true,
+};
+
+// Run tests against FooBar. Batch them into one TEST_F to save time.
+TEST_F('FooBarBrowserTest', 'FooBarTest', function() {
+ suite('FooBarTest', function() {
+ suite('Foo Behavior', function() {
+ test('Behaves as expected', function() {
+ assertTrue(true, 'should have been true');
+ assertFalse(false, 'should have been false');
+ });
+
+ test('Does not behave unexpectedly', function() {
+ assertEquals(1, 2, 'two should equal one');
+ assertEquals(2, 1, 'one should equal two');
+ });
+ });
+
+ suite('Bar Behavior', function() {
+ test('Works well with others', function() {});
+ });
+ });
+
+ // Kick off the tests.
+ mocha.run();
+});

Powered by Google App Engine
This is Rietveld 408576698