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

Side by Side Diff: content/browser/in_process_webkit/webkit_context_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/in_process_webkit/dom_storage_context.h" 5 #include "content/browser/in_process_webkit/dom_storage_context.h"
6 #include "content/browser/in_process_webkit/webkit_context.h" 6 #include "content/browser/in_process_webkit/webkit_context.h"
7 #include "content/test/test_browser_context.h" 7 #include "content/test/test_browser_context.h"
8 #include "content/test/test_browser_thread.h" 8 #include "content/test/test_browser_thread.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 using content::BrowserThread;
12
11 class MockDOMStorageContext : public DOMStorageContext { 13 class MockDOMStorageContext : public DOMStorageContext {
12 public: 14 public:
13 MockDOMStorageContext(WebKitContext* webkit_context, 15 MockDOMStorageContext(WebKitContext* webkit_context,
14 quota::SpecialStoragePolicy* special_storage_policy) 16 quota::SpecialStoragePolicy* special_storage_policy)
15 : DOMStorageContext(webkit_context, special_storage_policy), 17 : DOMStorageContext(webkit_context, special_storage_policy),
16 purge_count_(0) { 18 purge_count_(0) {
17 } 19 }
18 20
19 virtual void PurgeMemory() { 21 virtual void PurgeMemory() {
20 EXPECT_FALSE(BrowserThread::CurrentlyOn(BrowserThread::UI)); 22 EXPECT_FALSE(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 EXPECT_EQ(0, mock_context->purge_count()); 67 EXPECT_EQ(0, mock_context->purge_count());
66 context->PurgeMemory(); 68 context->PurgeMemory();
67 MessageLoop::current()->RunAllPending(); 69 MessageLoop::current()->RunAllPending();
68 EXPECT_EQ(1, mock_context->purge_count()); 70 EXPECT_EQ(1, mock_context->purge_count());
69 } 71 }
70 // WebKitContext's destructor posts stuff to the webkit thread. Let 72 // WebKitContext's destructor posts stuff to the webkit thread. Let
71 // WebKitContext go out of scope here before processing WebKitContext's 73 // WebKitContext go out of scope here before processing WebKitContext's
72 // clean-up tasks. 74 // clean-up tasks.
73 MessageLoop::current()->RunAllPending(); 75 MessageLoop::current()->RunAllPending();
74 } 76 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/webkit_context.cc ('k') | content/browser/in_process_webkit/webkit_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698