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

Unified Diff: chrome/test/data/extensions/api_test/tabs/basics/audible.js

Issue 2901403003: [Extensions Bindings] Update tabs tests to accept new error messages (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/move.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/tabs/basics/audible.js
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/audible.js b/chrome/test/data/extensions/api_test/tabs/basics/audible.js
index b8b01e6d5489d559f011c32da2c52949eb983115..f166be81c6a76e4a0f3280778762fb108839b20b 100644
--- a/chrome/test/data/extensions/api_test/tabs/basics/audible.js
+++ b/chrome/test/data/extensions/api_test/tabs/basics/audible.js
@@ -36,17 +36,23 @@ chrome.test.runTests([
},
function audibleUpdateAttemptShouldFail() {
- var error_msg = "Invalid value for argument 2. Property 'audible': " +
- "Unexpected property.";
+ var jsBindingsError =
lazyboy 2017/05/25 21:46:42 nit: jsBindingsExpectedError or expectedJSBindings
Devlin 2017/05/26 01:34:12 Done.
+ 'Invalid value for argument 2. Property \'audible\': ' +
+ 'Unexpected property.';
+ var nativeBindingsError =
+ 'Error in invocation of tabs.update(' +
+ 'optional integer tabId, object updateProperties, ' +
+ 'optional function callback): Error at parameter ' +
+ '\'updateProperties\': Unexpected property: \'audible\'.';
- try
- {
+ try {
chrome.tabs.update(testTabId_, {audible: true}, function(tab) {
- chrome.test.fail("Updated audible property via chrome.tabs.update");
+ chrome.test.fail('Updated audible property via chrome.tabs.update');
});
- } catch (e)
- {
- assertEq(error_msg, e.message);
+ } catch (e) {
+ assertTrue(e.message == jsBindingsError ||
+ e.message == nativeBindingsError,
+ e.message);
chrome.test.succeed();
}
},
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/move.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698