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

Unified Diff: test/cctest/test-api.cc

Issue 1466243002: [proxies] Refactor JSReceiver::GetKeys() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update test-api.cc Created 5 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
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 21de33d09ae8fcdec688d6e8bef2e29f39ae88b5..28ff3920022351901fba9dac4c62f543b193c582 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -8294,7 +8294,7 @@ THREADED_TEST(CrossDomainForInOnPrototype) {
// Change env2 to a different domain and set env1's global object
// as the __proto__ of an object in env2 and enumerate properties
// in for-in. It shouldn't enumerate properties on env1's global
- // object.
+ // object. It shouldn't throw either, just silently ignore them.
env2->SetSecurityToken(bar);
{
Context::Scope scope_env2(env2);
@@ -8305,9 +8305,9 @@ THREADED_TEST(CrossDomainForInOnPrototype) {
" for (var p in obj) {"
" if (p == 'prop') return false;"
" }"
- " return false;"
- " } catch (e) {"
" return true;"
+ " } catch (e) {"
+ " return false;"
" }"
"})()");
CHECK(result->IsTrue());
@@ -8753,6 +8753,7 @@ TEST(AccessControl) {
// Enumeration doesn't enumerate accessors from inaccessible objects in
// the prototype chain even if the accessors are in themselves accessible.
+ // Enumeration doesn't throw, it silently ignores what it can't access.
value = CompileRun(
"(function() {"
" var obj = { '__proto__': other };"
@@ -8764,9 +8765,9 @@ TEST(AccessControl) {
" return false;"
" }"
" }"
- " return false;"
- " } catch (e) {"
" return true;"
+ " } catch (e) {"
+ " return false;"
" }"
"})()");
CHECK(value->IsTrue());
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698