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

Side by Side 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 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 chrome.test.runTests([function tab() {
2 // Check that the localstorage stuff we stored is still there.
3 chrome.test.assertTrue(localStorage.foo == "bar");
4
5 // Check that the database stuff we stored is still there.
6 try {
7 console.log("Opening database...");
8 var db = window.openDatabase("mydb2", "1.0", "database test", 2048);
9 console.log("DONE opening database");
10 } catch (err) {
11 console.log("Exception");
12 console.log(err.message);
13 }
14 if (!db)
15 chrome.test.fail("failed to open database");
16
17 console.log("Performing transaction...");
18 db.transaction(function(tx) {
19 tx.executeSql("select body from note", [], function(tx, results) {
20 chrome.test.assertTrue(results.rows.length == 1);
21 chrome.test.assertTrue(results.rows.item(0).body == "hotdog");
22 chrome.test.succeed();
23 }, function(tx, error) {
24 chrome.test.fail(error.message);
25 });
26 }, function(error) {
27 chrome.test.fail(error.message);
28 });
29 }]);
OLDNEW
« 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