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

Unified Diff: content/browser/shared_worker/shared_worker_service_impl_unittest.cc

Issue 223123003: Make DevTools support for the embedded SharedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed version Created 6 years, 9 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 | « content/browser/shared_worker/shared_worker_service_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/shared_worker/shared_worker_service_impl_unittest.cc
diff --git a/content/browser/shared_worker/shared_worker_service_impl_unittest.cc b/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
index 112b8e83a08eceeec52be71baf1e59586db52a53..7c226d69c857c498c9c842407247f7bb8f2e2ca0 100644
--- a/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
+++ b/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
@@ -20,6 +20,7 @@
#include "content/common/worker_messages.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "content/public/test/test_utils.h"
#include "ipc/ipc_sync_message.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -356,6 +357,9 @@ TEST_F(SharedWorkerServiceImplTest, BasicTest) {
// SharedWorkerConnector creates two message ports and sends
// ViewHostMsg_CreateWorker.
connector->Create("http://example.com/w.js", "name", 200, 300);
+ // We need to go to UI thread to call
+ // SharedWorkerDevToolsManager::WorkerCreated().
+ RunAllPendingInMessageLoop();
EXPECT_EQ(2U, renderer_host->QueuedMessageCount());
// WorkerProcessMsg_CreateWorker should be sent to the renderer in which
// SharedWorker will be created.
@@ -441,6 +445,9 @@ TEST_F(SharedWorkerServiceImplTest, TwoRendererTest) {
// SharedWorkerConnector creates two message ports and sends
// ViewHostMsg_CreateWorker.
connector1->Create("http://example.com/w.js", "name", 200, 300);
+ // We need to go to UI thread to call
+ // SharedWorkerDevToolsManager::WorkerCreated().
+ RunAllPendingInMessageLoop();
EXPECT_EQ(2U, renderer_host1->QueuedMessageCount());
// WorkerProcessMsg_CreateWorker should be sent to the renderer in which
// SharedWorker will be created.
« no previous file with comments | « content/browser/shared_worker/shared_worker_service_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698