android: Update app-specific/MIME type icons
[LibreOffice.git] / uitest / demo_ui / handle_multiple_files.py
bloba15b92deeccbbd44aa7a900aca230531883348c9
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 from uitest.framework import UITestCase
11 from uitest.uihelper.common import get_url_for_data_file
12 import time
14 class HandleFiles(UITestCase):
16 def test_load_file(self):
18 with self.ui_test.load_file(get_url_for_data_file("test.ods")):
20 with self.ui_test.load_file(get_url_for_data_file("test2.ods")):
22 frames = self.ui_test.get_frames()
23 self.assertEqual(len(frames), 2)
25 frames = self.ui_test.get_frames()
26 self.assertEqual(len(frames), 1)
28 # this is currently still necessary as otherwise
29 # the command is not forwarded to the correct frame
30 # TODO: provide an additional event that we can use
31 # and get rid of the sleep
32 time.sleep(1)
34 def test_select_frame(self):
35 with self.ui_test.load_file(get_url_for_data_file("test.ods")):
37 with self.ui_test.load_file(get_url_for_data_file("test2.ods")):
38 frames = self.ui_test.get_frames()
39 self.assertEqual(len(frames), 2)
40 frames[0].activate()
42 frames = self.ui_test.get_frames()
43 self.assertEqual(len(frames), 1)
45 self.assertTrue(frames[0].getTitle().startswith("test2.ods"))
47 # vim: set shiftwidth=4 softtabstop=4 expandtab: