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

Unified Diff: extensions/test/data/web_view/apitest/main.js

Issue 698973003: Got rid of the internal copies of webview attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: extensions/test/data/web_view/apitest/main.js
diff --git a/extensions/test/data/web_view/apitest/main.js b/extensions/test/data/web_view/apitest/main.js
index 1287723c26f0e1a008f9ad2ffe116983b063f07c..6656e0540fc8f175d20c77621bb38999dcbb0878 100644
--- a/extensions/test/data/web_view/apitest/main.js
+++ b/extensions/test/data/web_view/apitest/main.js
@@ -1282,21 +1282,17 @@ function testOnEventProperties() {
document.body.appendChild(webview);
}
-// This test verifies that setting the partition attribute after the src has
-// been set raises an exception.
-function testPartitionRaisesException() {
+// This test verifies that the partion attribute cannot be changed after the src
+// has been set.
+function testPartitionChangeAfterNavigation() {
var webview = document.createElement('webview');
var partitionAttribute = arguments.callee.name;
webview.setAttribute('partition', partitionAttribute);
var loadstopHandler = function(e) {
- try {
- webview.partition = 'illegal';
- embedder.test.fail();
- } catch (e) {
- embedder.test.assertEq(partitionAttribute, webview.partition);
- embedder.test.succeed();
- }
+ webview.partition = 'illegal';
+ embedder.test.assertEq(partitionAttribute, webview.partition);
+ embedder.test.succeed();
};
webview.addEventListener('loadstop', loadstopHandler);
@@ -1707,7 +1703,7 @@ embedder.test.testList = {
'testNewWindowNoReferrerLink': testNewWindowNoReferrerLink,
'testNewWindowTwoListeners': testNewWindowTwoListeners,
'testOnEventProperties': testOnEventProperties,
- 'testPartitionRaisesException': testPartitionRaisesException,
+ 'testPartitionChangeAfterNavigation': testPartitionChangeAfterNavigation,
'testPartitionRemovalAfterNavigationFails':
testPartitionRemovalAfterNavigationFails,
'testReassignSrcAttribute': testReassignSrcAttribute,

Powered by Google App Engine
This is Rietveld 408576698