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

Side by Side Diff: content/test/data/dom_storage/sanity_check.js

Issue 382153006: Fix 'except' and 'prefer' spelling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop change to braille_table.js because it fails CQ. Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function startTestSoon() { 5 function startTestSoon() {
6 window.setTimeout(test, 0); 6 window.setTimeout(test, 0);
7 } 7 }
8 8
9 function test() { 9 function test() {
10 try { 10 try {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 "storage['name'] != 'value' after addition"); 53 "storage['name'] != 'value' after addition");
54 54
55 storage.clear(); 55 storage.clear();
56 56
57 checkEqual(0, storage.length, 57 checkEqual(0, storage.length,
58 "storage.length != 0 after clear"); 58 "storage.length != 0 after clear");
59 59
60 var tooLarge = makeLargeString((5 * 1024 * 1024) + 1); 60 var tooLarge = makeLargeString((5 * 1024 * 1024) + 1);
61 try { 61 try {
62 storage.setItem("tooLarge", tooLarge); 62 storage.setItem("tooLarge", tooLarge);
63 throw "failed to throw execption for very large value"; 63 throw "failed to throw exception for very large value";
64 } catch(ex) { 64 } catch(ex) {
65 checkEqual(ex.code, 22, 65 checkEqual(ex.code, 22,
66 "ex.code != 22 for attempt to store a very large value"); 66 "ex.code != 22 for attempt to store a very large value");
67 } 67 }
68 try { 68 try {
69 storage.setItem(tooLarge, "key is too large"); 69 storage.setItem(tooLarge, "key is too large");
70 throw "failed to throw execption for very large key"; 70 throw "failed to throw exception for very large key";
71 } catch(ex) { 71 } catch(ex) {
72 checkEqual(ex.code, 22, 72 checkEqual(ex.code, 22,
73 "ex.code != 22 for attempt to store a very large key"); 73 "ex.code != 22 for attempt to store a very large key");
74 } 74 }
75 } 75 }
76 76
77 function checkEqual(lhs, rhs, errorMessage) { 77 function checkEqual(lhs, rhs, errorMessage) {
78 if (lhs !== rhs) 78 if (lhs !== rhs)
79 throw errorMessage; 79 throw errorMessage;
80 } 80 }
81 81
82 function makeLargeString(minimumSize) { 82 function makeLargeString(minimumSize) {
83 return Array(minimumSize).join("X"); 83 return Array(minimumSize).join("X");
84 } 84 }
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_storage_impl_unittest.cc ('k') | media/video/capture/linux/video_capture_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698