Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / tools / perf / page_sets / mobile_memory.py
index f995d42..30ca5cf 100644 (file)
@@ -1,8 +1,6 @@
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
-# pylint: disable=W0401,W0614
-from telemetry.page.actions.all_page_actions import *
 from telemetry.page import page as page_module
 from telemetry.page import page_set as page_set_module
 
@@ -30,7 +28,7 @@ class GmailPage(MobileMemoryPage):
     self.credentials = 'google'
 
   def ReloadAndGc(self, action_runner):
-    action_runner.RunAction(ReloadAction())
+    action_runner.ReloadPage()
     action_runner.Wait(15)
     action_runner.ForceGarbageCollection()
 
@@ -49,13 +47,25 @@ class GoogleSearchPage(MobileMemoryPage):
         page_set=page_set)
 
   def RunStressMemory(self, action_runner):
-    action_runner.RunAction(ScrollAction())
+    interaction = action_runner.BeginGestureInteraction(
+        'ScrollAction', is_smooth=True)
+    action_runner.ScrollPage()
+    interaction.End()
     action_runner.Wait(3)
-    action_runner.RunAction(ScrollAction())
+    interaction = action_runner.BeginGestureInteraction(
+        'ScrollAction', is_smooth=True)
+    action_runner.ScrollPage()
+    interaction.End()
     action_runner.Wait(3)
-    action_runner.RunAction(ScrollAction())
+    interaction = action_runner.BeginGestureInteraction(
+        'ScrollAction', is_smooth=True)
+    action_runner.ScrollPage()
+    interaction.End()
     action_runner.Wait(3)
-    action_runner.RunAction(ScrollAction())
+    interaction = action_runner.BeginGestureInteraction(
+        'ScrollAction', is_smooth=True)
+    action_runner.ScrollPage()
+    interaction.End()
     action_runner.WaitForJavaScriptCondition(
         'document.getElementById("rg_s").childElementCount > 300')
 
@@ -66,7 +76,10 @@ class ScrollPage(MobileMemoryPage):
     super(ScrollPage, self).__init__(url=url, page_set=page_set)
 
   def RunStressMemory(self, action_runner):
-    action_runner.RunAction(ScrollAction())
+    interaction = action_runner.BeginGestureInteraction(
+        'ScrollAction', is_smooth=True)
+    action_runner.ScrollPage()
+    interaction.End()
 
 
 class MobileMemoryPageSet(page_set_module.PageSet):