diff options
author | dcheng <dcheng@chromium.org> | 2015-10-02 20:34:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-03 03:35:05 +0000 |
commit | 4dcf62a421fce8a8bd715d5dd6ff9d8f52557eae (patch) | |
tree | 771a2f48e78aadfb700d159ab8902cb9112c7e17 /extensions/renderer/api | |
parent | 98ebd843dd1c995dde895340c53ceca2e59c9a58 (diff) | |
download | chromium_src-4dcf62a421fce8a8bd715d5dd6ff9d8f52557eae.zip chromium_src-4dcf62a421fce8a8bd715d5dd6ff9d8f52557eae.tar.gz chromium_src-4dcf62a421fce8a8bd715d5dd6ff9d8f52557eae.tar.bz2 |
Remove stash_client.js dependency on unload_event.js
unload_event is problematic because it runs JS at inopportune times, in the
main world. This allows arbitrary web content to run JS at a time when
certain invariants in Blink may not hold true.
Unfortunately, the mojo version of the serial API depends on stash_client's
current implementation. Fortunately, it's not actually used in release yet.
BUG=537660
Review URL: https://codereview.chromium.org/1381563007
Cr-Commit-Position: refs/heads/master@{#352231}
Diffstat (limited to 'extensions/renderer/api')
-rw-r--r-- | extensions/renderer/api/serial/serial_api_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/renderer/api/serial/serial_api_unittest.cc b/extensions/renderer/api/serial/serial_api_unittest.cc index 8ba15f0..f90fe76 100644 --- a/extensions/renderer/api/serial/serial_api_unittest.cc +++ b/extensions/renderer/api/serial/serial_api_unittest.cc @@ -682,21 +682,22 @@ TEST_F(SerialApiTest, SendUnknownConnectionId) { RunTest("serial_unittest.js", "testSendUnknownConnectionId"); } -TEST_F(SerialApiTest, StashAndRestoreDuringEcho) { +// Note: these tests are disabled, since there is no good story for persisting +// the stashed handles when an extension process is shut down. See +// https://crbug.com/538774 +TEST_F(SerialApiTest, DISABLED_StashAndRestoreDuringEcho) { ASSERT_NO_FATAL_FAILURE(RunTest("serial_unittest.js", "testSendAndStash")); - env()->context()->DispatchOnUnloadEvent(); scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment()); ApiTestEnvironment new_api_test_env(new_env.get()); PrepareEnvironment(&new_api_test_env, stash_backend_.get()); new_api_test_env.RunTest("serial_unittest.js", "testRestoreAndReceive"); } -TEST_F(SerialApiTest, StashAndRestoreDuringEchoError) { +TEST_F(SerialApiTest, DISABLED_StashAndRestoreDuringEchoError) { io_handler_ = new ReceiveErrorTestIoHandler(device::serial::RECEIVE_ERROR_DEVICE_LOST); ASSERT_NO_FATAL_FAILURE( RunTest("serial_unittest.js", "testRestoreAndReceiveErrorSetUp")); - env()->context()->DispatchOnUnloadEvent(); scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment()); ApiTestEnvironment new_api_test_env(new_env.get()); PrepareEnvironment(&new_api_test_env, stash_backend_.get()); @@ -706,7 +707,6 @@ TEST_F(SerialApiTest, StashAndRestoreDuringEchoError) { TEST_F(SerialApiTest, StashAndRestoreNoConnections) { ASSERT_NO_FATAL_FAILURE( RunTest("serial_unittest.js", "testStashNoConnections")); - env()->context()->DispatchOnUnloadEvent(); io_handler_ = nullptr; scoped_ptr<ModuleSystemTestEnvironment> new_env(CreateEnvironment()); ApiTestEnvironment new_api_test_env(new_env.get()); |