summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:31:25 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:31:25 +0000
commit156ed27bc42a66a694e243f3ecb0ad80f0c83351 (patch)
tree999d33767f2c2a2b41a97daa2c1ea65a7045f10a /chrome/browser/tab_contents
parenta1dc714c599af4971dfe74a71c73a2be0ff3033b (diff)
downloadchromium_src-156ed27bc42a66a694e243f3ecb0ad80f0c83351.zip
chromium_src-156ed27bc42a66a694e243f3ecb0ad80f0c83351.tar.gz
chromium_src-156ed27bc42a66a694e243f3ecb0ad80f0c83351.tar.bz2
Take 2 at moving NTP CSS resources into the NTP resource cache.
Moving the HTML to the cache saved 8ms on New Tab Warm on Windows, maybe we can shave a few more ms off by moving the CSS. The last change had a regression on the mac new tab perf, so I suspect it's the extra round trip to the UI thread when trying to load the CSS (the UI thread is probably just busy at that time). Instead, I'm moving the generation of the CSS to the time the object is constructed, rather than when the resource is requested. This is like the code before, except sometimes we'll hit the cache. BUG=26228 Review URL: http://codereview.chromium.org/427003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
index 318be7d..1cf4e42 100644
--- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -31,6 +31,7 @@ class RenderViewHostManagerTest : public RenderViewHostTestHarness {
// different SiteInstances, BrowsingInstances, and RenderProcessHosts. This is
// a regression test for bug 9364.
TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
+ ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
GURL ntp(chrome::kChromeUINewTabURL);
GURL dest("http://www.google.com/");
@@ -78,6 +79,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
// EnableViewSourceMode message is sent on every navigation regardless
// RenderView is being newly created or reused.
TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
+ ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
const GURL kNtpUrl(chrome::kChromeUINewTabURL);
const GURL kUrl("view-source:http://foo");
@@ -228,6 +230,7 @@ TEST_F(RenderViewHostManagerTest, Navigate) {
// Tests DOMUI creation.
TEST_F(RenderViewHostManagerTest, DOMUI) {
+ ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
SiteInstance* instance = SiteInstance::CreateSiteInstance(profile_.get());
TestTabContents tab_contents(profile_.get(), instance);