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

Unified Diff: chrome/test/data/extensions/api_test/storage/tab.js

Issue 8762014: Move another set of extension tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/extensions/api_test/storage/tab.js
===================================================================
--- chrome/test/data/extensions/api_test/storage/tab.js (revision 0)
+++ chrome/test/data/extensions/api_test/storage/tab.js (revision 0)
@@ -0,0 +1,29 @@
+chrome.test.runTests([function tab() {
+ // Check that the localstorage stuff we stored is still there.
+ chrome.test.assertTrue(localStorage.foo == "bar");
+
+ // Check that the database stuff we stored is still there.
+ try {
+ console.log("Opening database...");
+ var db = window.openDatabase("mydb2", "1.0", "database test", 2048);
+ console.log("DONE opening database");
+ } catch (err) {
+ console.log("Exception");
+ console.log(err.message);
+ }
+ if (!db)
+ chrome.test.fail("failed to open database");
+
+ console.log("Performing transaction...");
+ db.transaction(function(tx) {
+ tx.executeSql("select body from note", [], function(tx, results) {
+ chrome.test.assertTrue(results.rows.length == 1);
+ chrome.test.assertTrue(results.rows.item(0).body == "hotdog");
+ chrome.test.succeed();
+ }, function(tx, error) {
+ chrome.test.fail(error.message);
+ });
+ }, function(error) {
+ chrome.test.fail(error.message);
+ });
+}]);
« no previous file with comments | « chrome/test/data/extensions/api_test/storage/tab.html ('k') | chrome/test/data/extensions/api_test/stubs/background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698