diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 18:42:51 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 18:42:51 +0000 |
commit | bb25dfd5d6354dd52f5f693269b807fd4f46161e (patch) | |
tree | 893fbdf495a8a36ab17ef726ba659349a448b6a4 /chrome/test/memory_test | |
parent | fb0770c95c9fe267feb17ca9216b996a9b5a2e56 (diff) | |
download | chromium_src-bb25dfd5d6354dd52f5f693269b807fd4f46161e.zip chromium_src-bb25dfd5d6354dd52f5f693269b807fd4f46161e.tar.gz chromium_src-bb25dfd5d6354dd52f5f693269b807fd4f46161e.tar.bz2 |
Refactor memory_test so that it can easily support additional workloads.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/340041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/memory_test')
-rw-r--r-- | chrome/test/memory_test/memory_test.cc | 371 |
1 files changed, 206 insertions, 165 deletions
diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc index 7d60132..bf081bd 100644 --- a/chrome/test/memory_test/memory_test.cc +++ b/chrome/test/memory_test/memory_test.cc @@ -30,7 +30,40 @@ static const FilePath::CharType kTempDirName[] = class MemoryTest : public UITest { public: - MemoryTest() : cleanup_temp_dir_on_exit_(false) { + MemoryTest() : cleanup_temp_dir_on_exit_(false) {} + + ~MemoryTest() { + // Cleanup our temporary directory. + if (cleanup_temp_dir_on_exit_) + file_util::Delete(temp_dir_, true); + } + + // Called from SetUp() to determine the user data dir to copy. + virtual FilePath GetUserDataDirSource() const = 0; + + // Called from Setup() to find the path for the chrome executable. + // An empty FilePath results in the default being used. + virtual FilePath GetBrowserDirectory() const { return FilePath(); } + + // Called from RunTest() to determine the set of URLs to retrieve. + // Returns the length of the list. + virtual size_t GetUrlList(std::string** list) const = 0; + + static FilePath GetReferenceBrowserDirectory() { + FilePath dir; + PathService::Get(chrome::DIR_TEST_TOOLS, &dir); + dir = dir.AppendASCII("reference_build"); +#if defined(OS_WIN) + dir = dir.AppendASCII("chrome"); +#elif defined(OS_LINUX) + dir = dir.AppendASCII("chrome_linux"); +#elif defined(OS_MACOSX) + dir = dir.AppendASCII("chrome_mac"); +#endif + return dir; + } + + virtual void SetUp() { show_window_ = true; // For now, turn off plugins because they crash like crazy. @@ -48,15 +81,9 @@ class MemoryTest : public UITest { CommandLine::ForCurrentProcess()->GetSwitchValue(switches::kUserDataDir)); if (profile_dir.empty()) { - // Compute the user-data-dir which contains our test cache. - PathService::Get(base::DIR_SOURCE_ROOT, &profile_dir); - profile_dir = profile_dir.AppendASCII("data"); - profile_dir = profile_dir.AppendASCII("memory_test"); - profile_dir = profile_dir.AppendASCII("general_mix"); - - if (!SetupTempDirectory(profile_dir)) { + if (!SetupTempDirectory(GetUserDataDirSource())) { // There isn't really a way to fail gracefully here. - // Neither this constuctor nor the SetUp() method return + // Neither this constructor nor the SetUp() method return // status to the caller. So, just fall through using the // default profile and log this. The failure will be // obvious. @@ -64,17 +91,23 @@ class MemoryTest : public UITest { } } + FilePath browser_dir = GetBrowserDirectory(); + if (!browser_dir.empty()) { +#if defined(OS_WIN) + browser_dir = browser_dir.AppendASCII("chrome"); +#elif defined(OS_LINUX) + browser_dir = browser_dir.AppendASCII("chrome_linux"); +#elif defined(OS_MACOSX) + browser_dir = browser_dir.AppendASCII("chrome_mac"); +#endif + browser_directory_ = browser_dir; + } + launch_arguments_.AppendSwitchWithValue(switches::kUserDataDir, user_data_dir_.ToWStringHack()); + UITest::SetUp(); } - ~MemoryTest() { - // Cleanup our temporary directory. - if (cleanup_temp_dir_on_exit_) - file_util::Delete(temp_dir_, true); - } - - // TODO(mbelshe): Separate this data to an external file. // This memory test loads a set of URLs across a set of tabs, maintaining the // number of concurrent open tabs at num_target_tabs. // <NEWTAB> is a special URL which informs the loop when we should create a @@ -82,131 +115,8 @@ class MemoryTest : public UITest { // <PAUSE> is a special URL that informs the loop to pause before proceeding // to the next URL. void RunTest(const char* test_name, int num_target_tabs) { - std::string urls[] = { - "http://www.yahoo.com/", - "http://hotjobs.yahoo.com/career-articles-the_biggest_resume_mistake_you_can_make-436", - "http://news.yahoo.com/s/ap/20080804/ap_on_re_mi_ea/odd_israel_home_alone", - "http://news.yahoo.com/s/nm/20080729/od_nm/subway_dc", - "http://search.yahoo.com/search?p=new+york+subway&ygmasrchbtn=web+search&fr=ush-news", - "<NEWTAB>", - "http://www.cnn.com/", - "http://www.cnn.com/2008/SHOWBIZ/TV/08/03/applegate.cancer.ap/index.html", - "http://www.cnn.com/2008/HEALTH/conditions/07/29/black.aids.report/index.html", - "http://www.cnn.com/POLITICS/", - "http://search.cnn.com/search.jsp?query=obama&type=web&sortBy=date&intl=false", - "<NEWTAB>", - "http://mail.google.com/", - "http://mail.google.com/mail/?shva=1", - "http://mail.google.com/mail/?shva=1#search/ipsec", - "http://mail.google.com/mail/?shva=1#search/ipsec/ee29ae66165d417", - "http://mail.google.com/mail/?shva=1#compose", - "<NEWTAB>", - "http://docs.google.com/", - "<NEWTAB>", - "http://calendar.google.com/", - "<NEWTAB>", - "http://maps.google.com/", - "http://maps.google.com/maps/mpl?moduleurl=http://earthquake.usgs.gov/eqcenter/mapplets/earthquakes.xml&ie=UTF8&ll=20,170&spn=140.625336,73.828125&t=k&z=2", - "http://maps.google.com/maps?f=q&hl=en&geocode=&q=1600+amphitheater+parkway,+mountain+view,+ca&ie=UTF8&z=13", - "<NEWTAB>", - "http://www.google.com/", - "http://www.google.com/search?hl=en&q=food&btnG=Google+Search", - "http://books.google.com/books?hl=en&q=food&um=1&ie=UTF-8&sa=N&tab=wp", - "http://images.google.com/images?hl=en&q=food&um=1&ie=UTF-8&sa=N&tab=pi", - "http://news.google.com/news?hl=en&q=food&um=1&ie=UTF-8&sa=N&tab=in", - "http://www.google.com/products?sa=N&tab=nf&q=food", - "<NEWTAB>", - "http://www.scoundrelspoint.com/polyhedra/shuttle/index.html", - "<PAUSE>", - "<NEWTAB>", - "http://ctho.ath.cx/toys/3d.html", - "<PAUSE>", - "<NEWTAB>", - "http://www.youtube.com/", - "http://www.youtube.com/results?search_query=funny&search_type=&aq=f", - "http://www.youtube.com/watch?v=GuMMfgWhm3g", - "<NEWTAB>", - "http://www.craigslist.com/", - "http://sfbay.craigslist.org/", - "http://sfbay.craigslist.org/apa/", - "http://sfbay.craigslist.org/sfc/apa/782398209.html", - "http://sfbay.craigslist.org/sfc/apa/782347795.html", - "http://sfbay.craigslist.org/sby/apa/782342791.html", - "http://sfbay.craigslist.org/sfc/apa/782344396.html", - "<NEWTAB>", - "http://www.whitehouse.gov/", - "http://www.whitehouse.gov/news/releases/2008/07/20080729.html", - "http://www.whitehouse.gov/infocus/afghanistan/", - "http://www.whitehouse.gov/infocus/africa/", - "<NEWTAB>", - "http://www.msn.com/", - "http://msn.foxsports.com/horseracing/story/8409670/Big-Brown-rebounds-in-Haskell-Invitational?MSNHPHMA", - "http://articles.moneycentral.msn.com/Investing/StockInvestingTrading/TheBiggestRiskToYourRetirement_SeriesHome.aspx", - "http://articles.moneycentral.msn.com/Investing/StockInvestingTrading/TheSmartWayToGetRich.aspx", - "http://articles.moneycentral.msn.com/Investing/ContrarianChronicles/TheFictionOfCorporateTransparency.aspx", - "<NEWTAB>", - "http://flickr.com/", - "http://flickr.com/explore/interesting/2008/03/18/", - "http://flickr.com/photos/chavals/2344906748/", - "http://flickr.com/photos/rosemary/2343058024/", - "http://flickr.com/photos/arbaa/2343235019/", - "<NEWTAB>", - "http://zh.wikipedia.org/wiki/%E6%B1%B6%E5%B7%9D%E5%A4%A7%E5%9C%B0%E9%9C%87", - "http://zh.wikipedia.org/wiki/5%E6%9C%8812%E6%97%A5", - "http://zh.wikipedia.org/wiki/5%E6%9C%8820%E6%97%A5", - "http://zh.wikipedia.org/wiki/%E9%A6%96%E9%A1%B5", - "<NEWTAB>", - "http://www.nytimes.com/pages/technology/index.html", - "http://pogue.blogs.nytimes.com/2008/07/17/a-candy-store-for-the-iphone/", - "http://www.nytimes.com/2008/07/21/technology/21pc.html?_r=1&ref=technology&oref=slogin", - "http://bits.blogs.nytimes.com/2008/07/19/a-wikipedian-challenge-convincing-arabic-speakers-to-write-in-arabic/", - "<NEWTAB>", - "http://www.amazon.com/exec/obidos/tg/browse/-/502394/ref=topnav_storetab_p", - "http://www.amazon.com/Panasonic-DMC-TZ5K-Digital-Optical-Stabilized/dp/B0011Z8CCG/ref=pd_ts_p_17?ie=UTF8&s=photo", - "http://www.amazon.com/Nikon-Coolpix-Digital-Vibration-Reduction/dp/B0012OI6HW/ref=pd_ts_p_24?ie=UTF8&s=photo", - "http://www.amazon.com/Digital-SLRs-Cameras-Photo/b/ref=sv_p_2?ie=UTF8&node=3017941", - "<NEWTAB>", - "http://www.boston.com/bigpicture/2008/07/californias_continuing_fires.html", - "http://www.boston.com/business/", - "http://www.boston.com/business/articles/2008/07/29/staples_has_a_games_plan/", - "http://www.boston.com/business/personalfinance/articles/2008/08/04/a_grim_forecast_for_heating_costs/", - "<NEWTAB>", - "http://arstechnica.com/", - "http://arstechnica.com/news.ars/post/20080721-this-years-e3-substance-over-styleand-far-from-dead.html", - "http://arstechnica.com/news.ars/post/20080729-ifpi-italian-police-take-down-italian-bittorrent-tracker.html", - "http://arstechnica.com/news.ars/post/20080804-congress-wants-privacy-answers-from-google-ms-aol.html", - "<NEWTAB>", - "http://finance.google.com/finance?q=NASDAQ:AAPL", - "http://finance.google.com/finance?q=GOOG&hl=en", - "<NEWTAB>", - "http://blog.wired.com/underwire/2008/07/futurama-gets-m.html", - "http://blog.wired.com/cars/2008/07/gas-prices-hit.html", - "<NEWTAB>", - "http://del.icio.us/popular/programming", - "http://del.icio.us/popular/", - "http://del.icio.us/tag/", - "<NEWTAB>", - "http://gadgets.boingboing.net/2008/07/21/boom-computing.html", - "http://3533.spreadshirt.com/us/US/Shop/", - "<NEWTAB>", - "http://www.autoblog.com/", - "http://www.autoblog.com/2008/07/21/audi-introduces-the-next-mmi/", - "http://www.autoblog.com/categories/auto-types/", - "http://www.autoblog.com/category/sports/", - "<NEWTAB>", - "http://www.wikipedia.org/", - "http://en.wikipedia.org/wiki/Main_Page", - "http://fr.wikipedia.org/wiki/Accueil", - "http://de.wikipedia.org/wiki/Hauptseite", - "http://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8", - "http://it.wikipedia.org/wiki/Pagina_principale", - "http://nl.wikipedia.org/wiki/Hoofdpagina", - "http://pt.wikipedia.org/wiki/P%C3%A1gina_principal", - "http://es.wikipedia.org/wiki/Portada", - "http://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0", - "<NEWTAB>", - "http://www.google.com/translate_t?hl=en&text=This%20Is%20A%20Test%20Of%20missspellingsdfdf&sl=en&tl=ja", - }; + std::string* urls; + size_t urls_length = GetUrlList(&urls); // Record the initial CommitCharge. This is a system-wide measurement, // so if other applications are running, they can create variance in this @@ -217,7 +127,7 @@ class MemoryTest : public UITest { scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); scoped_refptr<TabProxy> tab(window->GetActiveTab()); int expected_tab_count = 1; - for (unsigned counter = 0; counter < arraysize(urls); ++counter) { + for (unsigned counter = 0; counter < urls_length; ++counter) { std::string url = urls[counter]; if (url == "<PAUSE>") { // Special command to delay on this page @@ -226,7 +136,7 @@ class MemoryTest : public UITest { } if (url == "<NEWTAB>") { // Special command to create a new tab - if (++counter >= arraysize(urls)) + if (++counter >= urls_length) continue; // Newtab was specified at end of list. ignore. url = urls[counter]; @@ -405,40 +315,171 @@ class MemoryTest : public UITest { FilePath user_data_dir_; }; -class MemoryReferenceTest : public MemoryTest { +class GeneralMixMemoryTest : public MemoryTest { public: - // override the browser directory that is used by UITest::SetUp to cause it - // to use the reference build instead. - void SetUp() { - FilePath dir; - PathService::Get(chrome::DIR_TEST_TOOLS, &dir); - dir = dir.AppendASCII("reference_build"); -#if defined(OS_WIN) - dir = dir.AppendASCII("chrome"); -#elif defined(OS_LINUX) - dir = dir.AppendASCII("chrome_linux"); -#elif defined(OS_MACOSX) - dir = dir.AppendASCII("chrome_mac"); -#endif - browser_directory_ = dir; - UITest::SetUp(); + virtual FilePath GetUserDataDirSource() const { + FilePath profile_dir; + PathService::Get(base::DIR_SOURCE_ROOT, &profile_dir); + profile_dir = profile_dir.AppendASCII("data"); + profile_dir = profile_dir.AppendASCII("memory_test"); + profile_dir = profile_dir.AppendASCII("general_mix"); + return profile_dir; } - void RunTest(const char* test_name, int num_target_tabs) { - std::wstring pages, timings; - MemoryTest::RunTest(test_name, num_target_tabs); + virtual size_t GetUrlList(std::string** list) const { + *list = urls_; + return urls_length_; + } + + private: + static std::string urls_[]; + static size_t urls_length_; +}; + +// TODO(mbelshe): Separate this data to an external file. +std::string GeneralMixMemoryTest::urls_[] = { + "http://www.yahoo.com/", + "http://hotjobs.yahoo.com/career-articles-the_biggest_resume_mistake_you_can_make-436", + "http://news.yahoo.com/s/ap/20080804/ap_on_re_mi_ea/odd_israel_home_alone", + "http://news.yahoo.com/s/nm/20080729/od_nm/subway_dc", + "http://search.yahoo.com/search?p=new+york+subway&ygmasrchbtn=web+search&fr=ush-news", + "<NEWTAB>", + "http://www.cnn.com/", + "http://www.cnn.com/2008/SHOWBIZ/TV/08/03/applegate.cancer.ap/index.html", + "http://www.cnn.com/2008/HEALTH/conditions/07/29/black.aids.report/index.html", + "http://www.cnn.com/POLITICS/", + "http://search.cnn.com/search.jsp?query=obama&type=web&sortBy=date&intl=false", + "<NEWTAB>", + "http://mail.google.com/", + "http://mail.google.com/mail/?shva=1", + "http://mail.google.com/mail/?shva=1#search/ipsec", + "http://mail.google.com/mail/?shva=1#search/ipsec/ee29ae66165d417", + "http://mail.google.com/mail/?shva=1#compose", + "<NEWTAB>", + "http://docs.google.com/", + "<NEWTAB>", + "http://calendar.google.com/", + "<NEWTAB>", + "http://maps.google.com/", + "http://maps.google.com/maps/mpl?moduleurl=http://earthquake.usgs.gov/eqcenter/mapplets/earthquakes.xml&ie=UTF8&ll=20,170&spn=140.625336,73.828125&t=k&z=2", + "http://maps.google.com/maps?f=q&hl=en&geocode=&q=1600+amphitheater+parkway,+mountain+view,+ca&ie=UTF8&z=13", + "<NEWTAB>", + "http://www.google.com/", + "http://www.google.com/search?hl=en&q=food&btnG=Google+Search", + "http://books.google.com/books?hl=en&q=food&um=1&ie=UTF-8&sa=N&tab=wp", + "http://images.google.com/images?hl=en&q=food&um=1&ie=UTF-8&sa=N&tab=pi", + "http://news.google.com/news?hl=en&q=food&um=1&ie=UTF-8&sa=N&tab=in", + "http://www.google.com/products?sa=N&tab=nf&q=food", + "<NEWTAB>", + "http://www.scoundrelspoint.com/polyhedra/shuttle/index.html", + "<PAUSE>", + "<NEWTAB>", + "http://ctho.ath.cx/toys/3d.html", + "<PAUSE>", + "<NEWTAB>", + "http://www.youtube.com/", + "http://www.youtube.com/results?search_query=funny&search_type=&aq=f", + "http://www.youtube.com/watch?v=GuMMfgWhm3g", + "<NEWTAB>", + "http://www.craigslist.com/", + "http://sfbay.craigslist.org/", + "http://sfbay.craigslist.org/apa/", + "http://sfbay.craigslist.org/sfc/apa/782398209.html", + "http://sfbay.craigslist.org/sfc/apa/782347795.html", + "http://sfbay.craigslist.org/sby/apa/782342791.html", + "http://sfbay.craigslist.org/sfc/apa/782344396.html", + "<NEWTAB>", + "http://www.whitehouse.gov/", + "http://www.whitehouse.gov/news/releases/2008/07/20080729.html", + "http://www.whitehouse.gov/infocus/afghanistan/", + "http://www.whitehouse.gov/infocus/africa/", + "<NEWTAB>", + "http://www.msn.com/", + "http://msn.foxsports.com/horseracing/story/8409670/Big-Brown-rebounds-in-Haskell-Invitational?MSNHPHMA", + "http://articles.moneycentral.msn.com/Investing/StockInvestingTrading/TheBiggestRiskToYourRetirement_SeriesHome.aspx", + "http://articles.moneycentral.msn.com/Investing/StockInvestingTrading/TheSmartWayToGetRich.aspx", + "http://articles.moneycentral.msn.com/Investing/ContrarianChronicles/TheFictionOfCorporateTransparency.aspx", + "<NEWTAB>", + "http://flickr.com/", + "http://flickr.com/explore/interesting/2008/03/18/", + "http://flickr.com/photos/chavals/2344906748/", + "http://flickr.com/photos/rosemary/2343058024/", + "http://flickr.com/photos/arbaa/2343235019/", + "<NEWTAB>", + "http://zh.wikipedia.org/wiki/%E6%B1%B6%E5%B7%9D%E5%A4%A7%E5%9C%B0%E9%9C%87", + "http://zh.wikipedia.org/wiki/5%E6%9C%8812%E6%97%A5", + "http://zh.wikipedia.org/wiki/5%E6%9C%8820%E6%97%A5", + "http://zh.wikipedia.org/wiki/%E9%A6%96%E9%A1%B5", + "<NEWTAB>", + "http://www.nytimes.com/pages/technology/index.html", + "http://pogue.blogs.nytimes.com/2008/07/17/a-candy-store-for-the-iphone/", + "http://www.nytimes.com/2008/07/21/technology/21pc.html?_r=1&ref=technology&oref=slogin", + "http://bits.blogs.nytimes.com/2008/07/19/a-wikipedian-challenge-convincing-arabic-speakers-to-write-in-arabic/", + "<NEWTAB>", + "http://www.amazon.com/exec/obidos/tg/browse/-/502394/ref=topnav_storetab_p", + "http://www.amazon.com/Panasonic-DMC-TZ5K-Digital-Optical-Stabilized/dp/B0011Z8CCG/ref=pd_ts_p_17?ie=UTF8&s=photo", + "http://www.amazon.com/Nikon-Coolpix-Digital-Vibration-Reduction/dp/B0012OI6HW/ref=pd_ts_p_24?ie=UTF8&s=photo", + "http://www.amazon.com/Digital-SLRs-Cameras-Photo/b/ref=sv_p_2?ie=UTF8&node=3017941", + "<NEWTAB>", + "http://www.boston.com/bigpicture/2008/07/californias_continuing_fires.html", + "http://www.boston.com/business/", + "http://www.boston.com/business/articles/2008/07/29/staples_has_a_games_plan/", + "http://www.boston.com/business/personalfinance/articles/2008/08/04/a_grim_forecast_for_heating_costs/", + "<NEWTAB>", + "http://arstechnica.com/", + "http://arstechnica.com/news.ars/post/20080721-this-years-e3-substance-over-styleand-far-from-dead.html", + "http://arstechnica.com/news.ars/post/20080729-ifpi-italian-police-take-down-italian-bittorrent-tracker.html", + "http://arstechnica.com/news.ars/post/20080804-congress-wants-privacy-answers-from-google-ms-aol.html", + "<NEWTAB>", + "http://finance.google.com/finance?q=NASDAQ:AAPL", + "http://finance.google.com/finance?q=GOOG&hl=en", + "<NEWTAB>", + "http://blog.wired.com/underwire/2008/07/futurama-gets-m.html", + "http://blog.wired.com/cars/2008/07/gas-prices-hit.html", + "<NEWTAB>", + "http://del.icio.us/popular/programming", + "http://del.icio.us/popular/", + "http://del.icio.us/tag/", + "<NEWTAB>", + "http://gadgets.boingboing.net/2008/07/21/boom-computing.html", + "http://3533.spreadshirt.com/us/US/Shop/", + "<NEWTAB>", + "http://www.autoblog.com/", + "http://www.autoblog.com/2008/07/21/audi-introduces-the-next-mmi/", + "http://www.autoblog.com/categories/auto-types/", + "http://www.autoblog.com/category/sports/", + "<NEWTAB>", + "http://www.wikipedia.org/", + "http://en.wikipedia.org/wiki/Main_Page", + "http://fr.wikipedia.org/wiki/Accueil", + "http://de.wikipedia.org/wiki/Hauptseite", + "http://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8", + "http://it.wikipedia.org/wiki/Pagina_principale", + "http://nl.wikipedia.org/wiki/Hoofdpagina", + "http://pt.wikipedia.org/wiki/P%C3%A1gina_principal", + "http://es.wikipedia.org/wiki/Portada", + "http://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0", + "<NEWTAB>", + "http://www.google.com/translate_t?hl=en&text=This%20Is%20A%20Test%20Of%20missspellingsdfdf&sl=en&tl=ja" +}; +size_t GeneralMixMemoryTest::urls_length_ = arraysize(GeneralMixMemoryTest::urls_); + +class GenerlMixReferenceMemoryTest : public GeneralMixMemoryTest { + public: + virtual FilePath GetBrowserDirectory() const { + return GetReferenceBrowserDirectory(); } }; -TEST_F(MemoryTest, SingleTabTest) { +TEST_F(GeneralMixMemoryTest, SingleTabTest) { RunTest("1t", 1); } -TEST_F(MemoryTest, FiveTabTest) { +TEST_F(GeneralMixMemoryTest, FiveTabTest) { RunTest("5t", 5); } -TEST_F(MemoryTest, TwelveTabTest) { +TEST_F(GeneralMixMemoryTest, TwelveTabTest) { RunTest("12t", 12); } |