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

Side by Side Diff: chrome/browser/sessions/better_session_restore_browsertest.cc

Issue 11028110: This CL demonstrates some weird browser_test behavior on linux_chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whereas this works as expected Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_context_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/prefs/session_startup_pref.h" 9 #include "chrome/browser/prefs/session_startup_pref.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_tabstrip.h" 11 #include "chrome/browser/ui/browser_tabstrip.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/public/browser/dom_storage_context.h"
15 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
16 #include "content/public/test/browser_test_utils.h" 17 #include "content/public/test/browser_test_utils.h"
17 #include "net/base/net_util.h" 18 #include "net/base/net_util.h"
19 #include "webkit/dom_storage/dom_storage_area.h"
18 20
19 namespace { 21 namespace {
20 22
21 // The tests server is started separately for each test function (including PRE_ 23 // The tests server is started separately for each test function (including PRE_
22 // functions). We need a test server which always uses the same port, so that 24 // functions). We need a test server which always uses the same port, so that
23 // the pages can be accessed with the same URLs after restoring the browser 25 // the pages can be accessed with the same URLs after restoring the browser
24 // session. 26 // session.
25 class FixedPortTestServer : public net::LocalTestServer { 27 class FixedPortTestServer : public net::LocalTestServer {
26 public: 28 public:
27 explicit FixedPortTestServer(uint16 port) 29 explicit FixedPortTestServer(uint16 port)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 SessionStartupPref::SetStartupPref( 95 SessionStartupPref::SetStartupPref(
94 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); 96 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST));
95 StoreDataWithPage("session_cookies.html"); 97 StoreDataWithPage("session_cookies.html");
96 } 98 }
97 99
98 IN_PROC_BROWSER_TEST_F(BetterSessionRestoreTest, SessionCookies) { 100 IN_PROC_BROWSER_TEST_F(BetterSessionRestoreTest, SessionCookies) {
99 // The browsing session will be continued; just wait for the page to reload 101 // The browsing session will be continued; just wait for the page to reload
100 // and check the stored data. 102 // and check the stored data.
101 CheckReloadedPage(); 103 CheckReloadedPage();
102 } 104 }
105
106 class WeirdTest : public InProcessBrowserTest {
107 };
108
109 IN_PROC_BROWSER_TEST_F(WeirdTest, Weird) {
110 LOG(ERROR) << "Test starts, pid " << getpid();
111 dom_storage::DomStorageArea::set_me = 3;
112 LOG(ERROR) << "set_me was set to " << dom_storage::DomStorageArea::set_me;
113 LOG(ERROR) << "address of set_me: " << &dom_storage::DomStorageArea::set_me;
114
115 LOG(ERROR) << "setting via libcontent";
116 content::SetWeirdInt(6);
117
118 LOG(ERROR) << "Test ends, set_me " << dom_storage::DomStorageArea::set_me;
119 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698