Merge lp:~artmello/webbrowser-app/webbrowser-app-bookmarks_view into lp:webbrowser-app
- webbrowser-app-bookmarks_view
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Olivier Tilloy |
Approved revision: | 1242 |
Merged at revision: | 1237 |
Proposed branch: | lp:~artmello/webbrowser-app/webbrowser-app-bookmarks_view |
Merge into: | lp:webbrowser-app |
Diff against target: |
2039 lines (+1145/-440) 19 files modified
src/app/webbrowser/BookmarksFoldersView.qml (+42/-10) src/app/webbrowser/BookmarksFoldersViewWide.qml (+226/-0) src/app/webbrowser/BookmarksModelUtils.js (+27/-0) src/app/webbrowser/BookmarksView.qml (+132/-0) src/app/webbrowser/BookmarksViewWide.qml (+130/-0) src/app/webbrowser/Browser.qml (+82/-3) src/app/webbrowser/HistoryView.qml (+70/-83) src/app/webbrowser/HistoryViewWide.qml (+1/-0) src/app/webbrowser/NewTabView.qml (+4/-1) src/app/webbrowser/NewTabViewWide.qml (+35/-180) src/app/webbrowser/UrlDelegate.qml (+6/-1) src/app/webbrowser/UrlDelegateWide.qml (+3/-3) tests/autopilot/webbrowser_app/emulators/browser.py (+13/-2) tests/autopilot/webbrowser_app/tests/__init__.py (+9/-0) tests/autopilot/webbrowser_app/tests/test_bookmark_options.py (+16/-12) tests/autopilot/webbrowser_app/tests/test_keyboard.py (+45/-0) tests/autopilot/webbrowser_app/tests/test_new_tab_view.py (+47/-15) tests/unittests/qml/tst_BookmarksFoldersViewWide.qml (+257/-0) tests/unittests/qml/tst_NewTabViewWide.qml (+0/-130) |
To merge this branch: | bzr merge lp:~artmello/webbrowser-app/webbrowser-app-bookmarks_view |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Olivier Tilloy | Approve | ||
Ugo Riboni (community) | Approve | ||
Review via email: mp+270613@code.launchpad.net |
Commit message
Add bookmarks view to top level menu
Description of the change
Add bookmarks view to top level menu
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1166
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1167
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ugo Riboni (uriboni) wrote : | # |
- I can not get any favicon to load, even for sites that I just visited and have a favicon. The "globe" icon is always shown instead
- Open two browsers windows side by side and in one open the bookmarks view and in the other the history view:
The styles of the two are not consistent with each other. If necessary speak with design about this, but I would change the following things:
- In widescreen mode:
- Use the same font as the history items for bookmark items
- Use the same font as the dates in the history view for folders
- The bookmarks view header should have a separator
- The folder list items should have a separator
- In non-widescreen mode:
- The bookmarks view has an header, the history doesn't. I would add one to the history.
- The folders in the bookmarks view should probably start all collapsed instead of all open, unless no folders exist.
Arthur Mello (artmello) wrote : | # |
Thanks a lot for reviewing this. Comments bellow:
> - I can not get any favicon to load, even for sites that I just visited and
> have a favicon. The "globe" icon is always shown instead
I am not able to reproduce it, it seems to be working with old bookmarks and with new ones. How are you reproducing it? Some specific url domain?
> - Open two browsers windows side by side and in one open the bookmarks view
> and in the other the history view:
> The styles of the two are not consistent with each other. If necessary speak
> with design about this, but I would change the following things:
> - In widescreen mode:
> - Use the same font as the history items for bookmark items
> - Use the same font as the dates in the history view for folders
Fonts were the same, I set it to use the same fontSize. Let me know if it is better?
> - The bookmarks view header should have a separator
> - The folder list items should have a separator
Done
> - In non-widescreen mode:
> - The bookmarks view has an header, the history doesn't. I would add one
> to the history.
Since that would be a change on history view, what do you think of me doing this on a different MR?
> - The folders in the bookmarks view should probably start all collapsed
> instead of all open, unless no folders exist.
Done
Today we have URlDelegate and UrlDelegateWide with a lot of duplicate code, specially the one related with the url/title font. I didnt look further but would make sense to mix both those components on the same one? What do you think?
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1174
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ugo Riboni (uriboni) wrote : | # |
> Thanks a lot for reviewing this. Comments bellow:
>
> > - I can not get any favicon to load, even for sites that I just visited and
> > have a favicon. The "globe" icon is always shown instead
>
> I am not able to reproduce it, it seems to be working with old bookmarks and
> with new ones. How are you reproducing it? Some specific url domain?
It must have been my fault. It seems to be working OK now
The style of fonts and other visuals in the bookmarks window is now matching the style of fonts in the new tab view. Thanks for fixing this.
> > - In non-widescreen mode:
> > - The bookmarks view has an header, the history doesn't. I would add one
> > to the history.
>
> Since that would be a change on history view, what do you think of me doing
> this on a different MR?
It is OK to do it here, since it is a change with very little impact other than visuals. But I am happy to have it done in another MR if you prefer (though I won't be around to review it next week).
> > - The folders in the bookmarks view should probably start all collapsed
> > instead of all open, unless no folders exist.
>
> Done
Please add unit tests to ensure this works properly, and make sure this change did not break any AP or unit test.
> Today we have URlDelegate and UrlDelegateWide with a lot of duplicate code,
> specially the one related with the url/title font. I didnt look further but
> would make sense to mix both those components on the same one? What do you
> think?
I am happy to wait and do this in a separate MR. There is enough in this one already.
Other than this, there are lots of AP tests failing, and they seem to be related to bookmarks, so I suspect they are caused by your changes. Please check and make sure everything is passing (the infrastructure is OK at the moment, because most other branches pass all AP tests, so all AP errors are most likely caused by your changes).
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1174
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1176
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1177
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1179
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ugo Riboni (uriboni) wrote : | # |
Thanks for the fixes, but there is still a couple of issues that should be addressed:
1) Please make sure the header of the history and bookmarks pages is the same size. Check this screenshot to see the difference: http://
2) The divider line in narrow screen mode for the bookmarks and history is in the wrong place (there is white space below the line), as you can see here: http://
3) Can you please make sure that you added unit tests for this feature: "The folders in the [narrow screen mode] bookmarks view should start all collapsed, instead of all open, unless no folders exist." ?
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1183
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ugo Riboni (uriboni) wrote : | # |
All good now. Thanks for the fixes!
Olivier Tilloy (osomon) wrote : | # |
A remark on the visuals: in wide mode, I’m seeing a slightly darker gray band on the right of the view.
Olivier Tilloy (osomon) wrote : | # |
In BookmarksFolder
The same applies to BookmarksView.qml and BookmarksViewWi
In BookmarksFolder
The bookmarkEntryRe
The headers in bookmarks and history views shouldn’t be plain white. See the visual spec at https:/
In wide mode, the "all bookmarks" section always contains the homepage, as a hardcoded entry. In narrow mode, it doesn’t. Can we make the two views consistent, by displaying the homepage entry on both?
- 1184. By Arthur Mello
-
Merge with trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1184
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1185. By Arthur Mello
-
Remove darker gray band on the right of the view in wide mode.
- 1186. By Arthur Mello
-
Remove unnecessary onActiveFocusCh
anged handler - 1187. By Arthur Mello
-
Make BookmarksView.qml and BookmarksViewWi
de.qml FocusScopes - 1188. By Arthur Mello
-
Remove extraneous blank line
- 1189. By Arthur Mello
-
Simplify code when a Bookmark entry is removed in narrow mode
- 1190. By Arthur Mello
-
Simplify code when a Bookmark entry is removed in wide mode
- 1191. By Arthur Mello
-
Fix headers colors in bookmarks views
- 1192. By Arthur Mello
-
Fix headers colors in history views
- 1193. By Arthur Mello
-
Make the default homepage bookmark visible in all bookmarks views
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1193
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1194. By Arthur Mello
-
Fix AP tests
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1194
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1195. By Arthur Mello
-
Fix AP tests
- 1196. By Arthur Mello
-
Fix AP tests
Olivier Tilloy (osomon) wrote : | # |
The changes to UrlsList.qml are meaningless when we’re not prepending a hardcoded entry to the list. And the names of the added properties ('defaultUrl' and 'defaultUrlTitle') are poorly chosen: this is not a default entry, it’s an additional one.
Anyway, you could achieve the same result by building a new model based on the bookmarks model + that additional entry (with a special flag to ensure it can’t be deleted).
Olivier Tilloy (osomon) wrote : | # |
And what I’m suggesting above is actually what is already being done in BookmarksFolder
- 1197. By Arthur Mello
-
Undo changes for Homepage default bookmark
- 1198. By Arthur Mello
-
Make the default homepage bookmark visible in all bookmarks views
- 1199. By Arthur Mello
-
Fix AP tests for new tab view
- 1200. By Arthur Mello
-
Fix AP tests for new tab view
- 1201. By Arthur Mello
-
Fix AP tests for bookmark options
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1196
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
If I press Ctrl+F while in the bookmarks view and then exit the view, the find-in-page mode has been activated in the current tab. This shortcut should be deactivated while in the bookmarks view. Hint: update the 'enabled' property of the corresponding KeyboardShortcut element.
Similarly, if I press Ctrl+L while in the bookmarks view, it looses focus and I can’t regain it. In general, please make sure that all the app’s keyboard shortcuts don’t have unintended effects while in the view.
A keyboard shortcut to open the view would be useful. Both chromium and firefox on desktop use Ctrl+Shift+O, so we could use that one too.
In UrlDelegate.qml, listActions doesn’t need to be a property of an internal QtObject, it can simply be defined as a child of the top-level item with an id, which you would refer to in the assignment of leadingActions.
In BookmarksView.qml, I don’t think we need to expose the entire settings object as a top-level property. Given that only the homepage setting is used (and in a read-only manner), can you expose just that one?
property bool isHomeBookmark: folder === "" && index === 0
should reuse isAllBookmarksF
In general, please try and mark properties that won’t ever be written to with the 'readonly' keyword (such as isAllBookmarksF
And while we’re at it, in BookmarksFolder
In test_set_
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1201
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1202. By Arthur Mello
-
Disable Ctrl+F when Bookmarks are visible
- 1203. By Arthur Mello
-
Disable reloading current tab when Bookmarks view is visible
- 1204. By Arthur Mello
-
Disable history navigation while Bookmarks view is visible
- 1205. By Arthur Mello
-
Disable toggle bookmarked state when bookmarks view is visible
- 1206. By Arthur Mello
-
Disable selecting the content in the address bar when Bookmarks is visible
- 1207. By Arthur Mello
-
Disable creating/closing tabs when bookmarks view is visible
- 1208. By Arthur Mello
-
Disable cycling through open tabs when bookmarks view is visible
- 1209. By Arthur Mello
-
Add Ctrl+Shift+O as a shortcut for Bookmarks
- 1210. By Arthur Mello
-
Simplify the way that listItemActions are defined on UrlDelegate
- 1211. By Arthur Mello
-
Do not expose the entire settings object to the bookmarks view
- 1212. By Arthur Mello
-
Reuse isAllBookmarksF
older to define isHomeBookmark property - 1213. By Arthur Mello
-
Set properties as readonly
- 1214. By Arthur Mello
-
Simplify use of isHomeBookmark in BookmarksFolder
sView - 1215. By Arthur Mello
-
Remove unused variable in AP test
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1212
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1215
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
Instead of setting 'enabled' to 'chrome.visible && !bookmarksViewL
That way you wouldn’t have to update the enabled property of every single keyboard shortcut, and that would make for much easier maintenance.
Once done, please test all the keyboard shortcuts and ensure that they function only where intended. Please also add/update tests in tests/autopilot
The Ctrl+T shortcut should be enabled while in the bookmarks view, to be consistent with the fact that the view has a "new tab" toolbar button. Of course opening a new tab should close the view.
- 1216. By Arthur Mello
-
Change the check to enable/disable keyboard shortcuts
- 1217. By Arthur Mello
-
Enable Ctrl+T to create a new tab when in bookmarks view
- 1218. By Arthur Mello
-
Fix wrong test to check if it is a removable bookmark
- 1219. By Arthur Mello
-
Add AP tests for bookmarks keyboard shortcuts
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1217
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
We’re getting there. Some additional comments:
In BookmarksFolder
In BookmarksView.qml and BookmarksViewWi
In Browser.qml, the signal handlers for the BookmarksView and the BookmarksViewWide instances are duplicated. Can you maybe use a Connections item to factor them out? I haven’t verified, would something like that work?
Connections {
target: bookmarksViewLo
onDone: …
}
In the Ctrl+T KeyboardShortcut’s onTriggered, no need to check whether bookmarksViewLo
While we’re at it, can you add support for the Ctrl+T shortcut in the history view, similarly to what you did for the bookmarks view?
In tests/autopilot
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1219
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1220. By Arthur Mello
-
Remove unused imports
- 1221. By Arthur Mello
-
Converge signal handlers for the BookmarksView to the same place
- 1222. By Arthur Mello
-
Change check for bookmarks view active on Ctrl+T shortcut
Make Ctrl+T shortcut work for History view and add an AP test - 1223. By Arthur Mello
-
Remove custom CPOs for BookmarksView and BookmarksViewWide
- 1224. By Arthur Mello
-
Move code to add homepage to bookmarks model to a shared helper function
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1224
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1224
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
Comments on revision 1224:
- In BookmarksModelU
* Is there really a use case for model==null? It looks like that check was in BookmarksFolder
* The docstring for the function isn’t correct, it’s not a temporary model (it would be temporary if it was instantiated, used and then deleted within the same scope). And there shouldn’t be a check for homeEntry=
* Can we find a more expressive name for createUrlsListM
- As pointed out above, in BookmarksFolder
Olivier Tilloy (osomon) wrote : | # |
I’m seeing multiple autopilot failures when run locally on my desktop (at least 4 in test_bookmark_
- 1225. By Arthur Mello
-
Merge with trunk
- 1226. By Arthur Mello
-
Remove null model checkrom BookmarksModelUtils
- 1227. By Arthur Mello
-
Change docstring and function name for BookmarksModelUtils
- 1228. By Arthur Mello
-
Do not call utils function when not adding a homepage bookmark entry
- 1229. By Arthur Mello
-
Fix wrong remove
- 1230. By Arthur Mello
-
Fix AP tests
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1230
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
In BookmarksView.qml and BookmarksViewWi
Olivier Tilloy (osomon) wrote : | # |
In the Connections instance inside bookmarksViewLo
Olivier Tilloy (osomon) wrote : | # |
In the bookmarks view and in the new tab view in wide mode, pressing the right arrow key to move the focus to the right panel works when the first folder is currently highlighted, but not with other folders.
Olivier Tilloy (osomon) wrote : | # |
(please add a test for the fix to the issue above)
- 1231. By Arthur Mello
-
Merge with trunk
- 1232. By Arthur Mello
-
Remove references to browser component from BookmarksView/
BookmarksViewWi de - 1233. By Arthur Mello
-
Remove unnecesary check
- 1234. By Arthur Mello
-
Fix keyboard navigation
- 1235. By Arthur Mello
-
Expand unittest to BookmarksFolder
sViewWide keyboa navigation
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1235
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1236. By Arthur Mello
-
Fix AP test issue
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1236
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1236
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
There are now conflicts when merging this branch into the latest trunk, can you please resolve them?
- 1237. By Arthur Mello
-
Merge with trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1237
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
Please revert the changes to po/webbrowser-
Olivier Tilloy (osomon) wrote : | # |
Keyboard navigation appears to be broken in the bookmarks section of the wide new tab view.
- 1238. By Arthur Mello
-
Undo changes on po
- 1239. By Arthur Mello
-
Merge with trunk
- 1240. By Arthur Mello
-
Keep webbrowser-app.po from trunk
- 1241. By Arthur Mello
-
Fix NewTabViewWide keyboard navigation
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1238
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
In NewTabView.qml, there’s a modified line that has an extraneous trailing whitespace, can you please remove it?
- 1242. By Arthur Mello
-
Remove extraneous trailing whitespace
Olivier Tilloy (osomon) wrote : | # |
Thanks, LGTM now.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1241
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1242
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === renamed file 'src/app/webbrowser/BookmarksFolderListView.qml' => 'src/app/webbrowser/BookmarksFoldersView.qml' | |||
2 | --- src/app/webbrowser/BookmarksFolderListView.qml 2015-08-10 15:22:00 +0000 | |||
3 | +++ src/app/webbrowser/BookmarksFoldersView.qml 2015-10-16 15:16:36 +0000 | |||
4 | @@ -20,11 +20,14 @@ | |||
5 | 20 | import Ubuntu.Components 1.3 | 20 | import Ubuntu.Components 1.3 |
6 | 21 | import Ubuntu.Components.ListItems 1.3 as ListItem | 21 | import Ubuntu.Components.ListItems 1.3 as ListItem |
7 | 22 | import webbrowserapp.private 0.1 | 22 | import webbrowserapp.private 0.1 |
8 | 23 | import "BookmarksModelUtils.js" as BookmarksModelUtils | ||
9 | 23 | 24 | ||
12 | 24 | Item { | 25 | FocusScope { |
13 | 25 | id: bookmarksFolderListViewItem | 26 | id: bookmarksFoldersViewItem |
14 | 26 | 27 | ||
15 | 27 | property alias model: bookmarksFolderListModel.sourceModel | 28 | property alias model: bookmarksFolderListModel.sourceModel |
16 | 29 | property alias interactive: bookmarksFolderListView.interactive | ||
17 | 30 | property url homeBookmarkUrl | ||
18 | 28 | 31 | ||
19 | 29 | signal bookmarkClicked(url url) | 32 | signal bookmarkClicked(url url) |
20 | 30 | signal bookmarkRemoved(url url) | 33 | signal bookmarkRemoved(url url) |
21 | @@ -39,6 +42,7 @@ | |||
22 | 39 | id: bookmarksFolderListView | 42 | id: bookmarksFolderListView |
23 | 40 | anchors.fill: parent | 43 | anchors.fill: parent |
24 | 41 | interactive: false | 44 | interactive: false |
25 | 45 | focus: true | ||
26 | 42 | 46 | ||
27 | 43 | model: bookmarksFolderListModel | 47 | model: bookmarksFolderListModel |
28 | 44 | delegate: Loader { | 48 | delegate: Loader { |
29 | @@ -65,7 +69,7 @@ | |||
30 | 65 | Column { | 69 | Column { |
31 | 66 | id: delegateColumn | 70 | id: delegateColumn |
32 | 67 | 71 | ||
34 | 68 | property bool expanded: true | 72 | property bool expanded: folderName ? false : true |
35 | 69 | 73 | ||
36 | 70 | anchors { | 74 | anchors { |
37 | 71 | left: parent.left | 75 | left: parent.left |
38 | @@ -138,16 +142,44 @@ | |||
39 | 138 | right: parent.right | 142 | right: parent.right |
40 | 139 | } | 143 | } |
41 | 140 | 144 | ||
42 | 145 | height: item ? item.contentHeight : 0 | ||
43 | 146 | |||
44 | 141 | visible: status == Loader.Ready | 147 | visible: status == Loader.Ready |
45 | 142 | 148 | ||
46 | 143 | active: delegateColumn.expanded | 149 | active: delegateColumn.expanded |
54 | 144 | sourceComponent: UrlsList { | 150 | sourceComponent: ListView { |
55 | 145 | spacing: 0 | 151 | readonly property bool isAllBookmarksFolder: folder === "" |
56 | 146 | 152 | ||
57 | 147 | model: entries | 153 | interactive: false |
58 | 148 | 154 | ||
59 | 149 | onUrlClicked: bookmarksFolderListViewItem.bookmarkClicked(url) | 155 | model: { |
60 | 150 | onUrlRemoved: bookmarksFolderListViewItem.bookmarkRemoved(url) | 156 | if (isAllBookmarksFolder) { |
61 | 157 | return BookmarksModelUtils.prependHomepageToBookmarks(entries, { | ||
62 | 158 | title: i18n.tr("Homepage"), | ||
63 | 159 | url: bookmarksFoldersViewItem.homeBookmarkUrl | ||
64 | 160 | }) | ||
65 | 161 | } | ||
66 | 162 | |||
67 | 163 | return entries | ||
68 | 164 | } | ||
69 | 165 | |||
70 | 166 | delegate: UrlDelegate{ | ||
71 | 167 | id: urlDelegate | ||
72 | 168 | |||
73 | 169 | property var entry: isAllBookmarksFolder ? modelData : model | ||
74 | 170 | |||
75 | 171 | width: parent.width | ||
76 | 172 | height: units.gu(5) | ||
77 | 173 | |||
78 | 174 | removable: !isAllBookmarksFolder || index !== 0 | ||
79 | 175 | |||
80 | 176 | icon: entry.icon ? entry.icon : "" | ||
81 | 177 | title: entry.title ? entry.title : entry.url | ||
82 | 178 | url: entry.url | ||
83 | 179 | |||
84 | 180 | onClicked: bookmarksFoldersViewItem.bookmarkClicked(url) | ||
85 | 181 | onRemoved: bookmarksFoldersViewItem.bookmarkRemoved(url) | ||
86 | 182 | } | ||
87 | 151 | } | 183 | } |
88 | 152 | } | 184 | } |
89 | 153 | } | 185 | } |
90 | 154 | 186 | ||
91 | === added file 'src/app/webbrowser/BookmarksFoldersViewWide.qml' | |||
92 | --- src/app/webbrowser/BookmarksFoldersViewWide.qml 1970-01-01 00:00:00 +0000 | |||
93 | +++ src/app/webbrowser/BookmarksFoldersViewWide.qml 2015-10-16 15:16:36 +0000 | |||
94 | @@ -0,0 +1,226 @@ | |||
95 | 1 | /* | ||
96 | 2 | * Copyright 2015 Canonical Ltd. | ||
97 | 3 | * | ||
98 | 4 | * This file is part of webbrowser-app. | ||
99 | 5 | * | ||
100 | 6 | * webbrowser-app is free software; you can redistribute it and/or modify | ||
101 | 7 | * it under the terms of the GNU General Public License as published by | ||
102 | 8 | * the Free Software Foundation; version 3. | ||
103 | 9 | * | ||
104 | 10 | * webbrowser-app is distributed in the hope that it will be useful, | ||
105 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
106 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
107 | 13 | * GNU General Public License for more details. | ||
108 | 14 | * | ||
109 | 15 | * You should have received a copy of the GNU General Public License | ||
110 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
111 | 17 | */ | ||
112 | 18 | |||
113 | 19 | import QtQuick 2.4 | ||
114 | 20 | import Ubuntu.Components 1.3 | ||
115 | 21 | import webbrowserapp.private 0.1 | ||
116 | 22 | import "BookmarksModelUtils.js" as BookmarksModelUtils | ||
117 | 23 | |||
118 | 24 | FocusScope { | ||
119 | 25 | id: bookmarksFoldersViewWideItem | ||
120 | 26 | |||
121 | 27 | property alias model: bookmarksFolderListModel.sourceModel | ||
122 | 28 | property url homeBookmarkUrl | ||
123 | 29 | |||
124 | 30 | signal bookmarkClicked(url url) | ||
125 | 31 | signal bookmarkRemoved(url url) | ||
126 | 32 | signal dragStarted() | ||
127 | 33 | |||
128 | 34 | function restoreLastFocusedColumn() { | ||
129 | 35 | if (internal.lastFocusedColumn && | ||
130 | 36 | internal.lastFocusedColumn == bookmarksList && | ||
131 | 37 | model.count > 0) { | ||
132 | 38 | bookmarksList.forceActiveFocus() | ||
133 | 39 | } else { | ||
134 | 40 | folders.forceActiveFocus() | ||
135 | 41 | } | ||
136 | 42 | } | ||
137 | 43 | |||
138 | 44 | onActiveFocusChanged: { | ||
139 | 45 | if (activeFocus) { | ||
140 | 46 | restoreLastFocusedColumn() | ||
141 | 47 | } | ||
142 | 48 | } | ||
143 | 49 | |||
144 | 50 | Rectangle { | ||
145 | 51 | anchors.fill: parent | ||
146 | 52 | color: "#fbfbfb" | ||
147 | 53 | } | ||
148 | 54 | |||
149 | 55 | ListView { | ||
150 | 56 | id: folders | ||
151 | 57 | objectName: "foldersList" | ||
152 | 58 | |||
153 | 59 | anchors { | ||
154 | 60 | top: parent.top | ||
155 | 61 | bottom: parent.bottom | ||
156 | 62 | left: parent.left | ||
157 | 63 | } | ||
158 | 64 | |||
159 | 65 | width: units.gu(25) | ||
160 | 66 | |||
161 | 67 | onActiveFocusChanged: { | ||
162 | 68 | if (activeFocus) { | ||
163 | 69 | internal.lastFocusedColumn = folders | ||
164 | 70 | } | ||
165 | 71 | } | ||
166 | 72 | |||
167 | 73 | model: BookmarksFolderListModel { | ||
168 | 74 | id: bookmarksFolderListModel | ||
169 | 75 | } | ||
170 | 76 | currentIndex: 0 | ||
171 | 77 | |||
172 | 78 | Keys.onRightPressed: { | ||
173 | 79 | if (!folders.currentItem) { | ||
174 | 80 | return | ||
175 | 81 | } | ||
176 | 82 | |||
177 | 83 | if ((folders.currentItem.isAllBookmarksFolder && bookmarksList.model.length > 0) || bookmarksList.model.count > 0) { | ||
178 | 84 | bookmarksList.focus = true | ||
179 | 85 | } | ||
180 | 86 | } | ||
181 | 87 | |||
182 | 88 | delegate: ListItem { | ||
183 | 89 | id: folderItem | ||
184 | 90 | objectName: "folderItem" | ||
185 | 91 | |||
186 | 92 | property alias name: dropArea.folderName | ||
187 | 93 | property var model: entries | ||
188 | 94 | readonly property bool isActiveFolder: ListView.isCurrentItem | ||
189 | 95 | readonly property bool isAllBookmarksFolder: folder.length === 0 | ||
190 | 96 | readonly property bool isCurrentDropTarget: dropArea.containsDrag && dropArea.drag.source.folder !== folder | ||
191 | 97 | |||
192 | 98 | color: isCurrentDropTarget ? "green" : | ||
193 | 99 | ((folders.activeFocus && isActiveFolder) ? Qt.rgba(0, 0, 0, 0.05) : "transparent") | ||
194 | 100 | |||
195 | 101 | Label { | ||
196 | 102 | anchors { | ||
197 | 103 | verticalCenter: parent.verticalCenter | ||
198 | 104 | left: parent.left | ||
199 | 105 | right: parent.right | ||
200 | 106 | leftMargin: units.gu(2) | ||
201 | 107 | rightMargin: units.gu(2) | ||
202 | 108 | } | ||
203 | 109 | |||
204 | 110 | fontSize: "small" | ||
205 | 111 | text: isAllBookmarksFolder ? i18n.tr("All Bookmarks") : folderItem.name | ||
206 | 112 | color: isActiveFolder ? UbuntuColors.orange : UbuntuColors.darkGrey | ||
207 | 113 | } | ||
208 | 114 | |||
209 | 115 | onClicked: folders.currentIndex = index | ||
210 | 116 | |||
211 | 117 | DropArea { | ||
212 | 118 | id: dropArea | ||
213 | 119 | |||
214 | 120 | property string folderName: folder | ||
215 | 121 | anchors.fill: parent | ||
216 | 122 | } | ||
217 | 123 | } | ||
218 | 124 | } | ||
219 | 125 | |||
220 | 126 | Scrollbar { | ||
221 | 127 | flickableItem: folders | ||
222 | 128 | } | ||
223 | 129 | |||
224 | 130 | ListView { | ||
225 | 131 | id: bookmarksList | ||
226 | 132 | objectName: "bookmarksList" | ||
227 | 133 | |||
228 | 134 | anchors { | ||
229 | 135 | top: parent.top | ||
230 | 136 | bottom: parent.bottom | ||
231 | 137 | left: folders.right | ||
232 | 138 | right: parent.right | ||
233 | 139 | } | ||
234 | 140 | |||
235 | 141 | onActiveFocusChanged: { | ||
236 | 142 | if (activeFocus) { | ||
237 | 143 | internal.lastFocusedColumn = bookmarksList | ||
238 | 144 | } | ||
239 | 145 | } | ||
240 | 146 | |||
241 | 147 | model: { | ||
242 | 148 | if (!folders.currentItem || !folders.currentItem.model) { | ||
243 | 149 | return null | ||
244 | 150 | } | ||
245 | 151 | |||
246 | 152 | if (folders.currentItem.isAllBookmarksFolder) { | ||
247 | 153 | return BookmarksModelUtils.prependHomepageToBookmarks(folders.currentItem.model, { | ||
248 | 154 | title: i18n.tr("Homepage"), | ||
249 | 155 | url: bookmarksFoldersViewWideItem.homeBookmarkUrl, | ||
250 | 156 | folder: "" | ||
251 | 157 | }) | ||
252 | 158 | } | ||
253 | 159 | |||
254 | 160 | return folders.currentItem.model | ||
255 | 161 | } | ||
256 | 162 | |||
257 | 163 | currentIndex: 0 | ||
258 | 164 | |||
259 | 165 | delegate: DraggableUrlDelegateWide { | ||
260 | 166 | objectName: "bookmarkItem" | ||
261 | 167 | |||
262 | 168 | property var entry: folders.currentItem.isAllBookmarksFolder ? modelData : model | ||
263 | 169 | property string folder: entry.folder | ||
264 | 170 | readonly property bool isHomeBookmark: folder === "" && index === 0 | ||
265 | 171 | |||
266 | 172 | clip: true | ||
267 | 173 | title: entry.title | ||
268 | 174 | icon: entry.icon ? entry.icon : "" | ||
269 | 175 | url: entry.url | ||
270 | 176 | |||
271 | 177 | removable: !isHomeBookmark | ||
272 | 178 | draggable: !isHomeBookmark && contentItem.x === 0 | ||
273 | 179 | highlighted: bookmarksList.activeFocus && ListView.isCurrentItem | ||
274 | 180 | |||
275 | 181 | onClicked: bookmarksFoldersViewWideItem.bookmarkClicked(url) | ||
276 | 182 | onRemoved: bookmarksFoldersViewWideItem.bookmarkRemoved(url) | ||
277 | 183 | |||
278 | 184 | // Larger margin to prevent interference from Scrollbar hovering area | ||
279 | 185 | gripMargin: units.gu(4) | ||
280 | 186 | onDragStarted: { | ||
281 | 187 | // Remove interactivity to prevent the list from scrolling | ||
282 | 188 | // while dragging near its margins. This ensures we can correctly | ||
283 | 189 | // return the item to its original position on a failed drop. | ||
284 | 190 | bookmarksList.interactive = false | ||
285 | 191 | |||
286 | 192 | bookmarksFoldersViewWideItem.dragStarted() | ||
287 | 193 | } | ||
288 | 194 | onDragEnded: { | ||
289 | 195 | bookmarksList.interactive = true | ||
290 | 196 | |||
291 | 197 | if (dragAndDrop.target && dragAndDrop.target.folderName !== folder) { | ||
292 | 198 | bookmarksFoldersViewWideItem.model.update(entry.url, entry.title, | ||
293 | 199 | dragAndDrop.target.folderName) | ||
294 | 200 | dragAndDrop.success = true | ||
295 | 201 | } | ||
296 | 202 | } | ||
297 | 203 | } | ||
298 | 204 | |||
299 | 205 | Keys.onReturnPressed: bookmarksFoldersViewWideItem.bookmarkClicked(currentItem.url) | ||
300 | 206 | Keys.onDeletePressed: { | ||
301 | 207 | if (currentItem.removable) { | ||
302 | 208 | bookmarksFoldersViewWideItem.bookmarkRemoved(currentItem.url) | ||
303 | 209 | if (bookmarksList.model.length === 0) { | ||
304 | 210 | folders.focus = true | ||
305 | 211 | } | ||
306 | 212 | } | ||
307 | 213 | } | ||
308 | 214 | Keys.onLeftPressed: folders.focus = true | ||
309 | 215 | } | ||
310 | 216 | |||
311 | 217 | Scrollbar { | ||
312 | 218 | flickableItem: bookmarksList | ||
313 | 219 | } | ||
314 | 220 | |||
315 | 221 | QtObject { | ||
316 | 222 | id: internal | ||
317 | 223 | |||
318 | 224 | property var lastFocusedColumn: folders | ||
319 | 225 | } | ||
320 | 226 | } | ||
321 | 0 | 227 | ||
322 | === added file 'src/app/webbrowser/BookmarksModelUtils.js' | |||
323 | --- src/app/webbrowser/BookmarksModelUtils.js 1970-01-01 00:00:00 +0000 | |||
324 | +++ src/app/webbrowser/BookmarksModelUtils.js 2015-10-16 15:16:36 +0000 | |||
325 | @@ -0,0 +1,27 @@ | |||
326 | 1 | /* | ||
327 | 2 | * Copyright 2015 Canonical Ltd. | ||
328 | 3 | * | ||
329 | 4 | * This file is part of webbrowser-app. | ||
330 | 5 | * | ||
331 | 6 | * webbrowser-app is free software; you can redistribute it and/or modify | ||
332 | 7 | * it under the terms of the GNU General Public License as published by | ||
333 | 8 | * the Free Software Foundation; version 3. | ||
334 | 9 | * | ||
335 | 10 | * webbrowser-app is distributed in the hope that it will be useful, | ||
336 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
337 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
338 | 13 | * GNU General Public License for more details. | ||
339 | 14 | * | ||
340 | 15 | * You should have received a copy of the GNU General Public License | ||
341 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
342 | 17 | */ | ||
343 | 18 | |||
344 | 19 | /* Prepend the homepage bookmark item to bookmarks model */ | ||
345 | 20 | function prependHomepageToBookmarks(model, homeEntry) { | ||
346 | 21 | var items = [] | ||
347 | 22 | items.push(homeEntry) | ||
348 | 23 | for (var i = 0; i < model.count; i++) { | ||
349 | 24 | items.push(model.get(i)) | ||
350 | 25 | } | ||
351 | 26 | return items | ||
352 | 27 | } | ||
353 | 0 | 28 | ||
354 | === added file 'src/app/webbrowser/BookmarksView.qml' | |||
355 | --- src/app/webbrowser/BookmarksView.qml 1970-01-01 00:00:00 +0000 | |||
356 | +++ src/app/webbrowser/BookmarksView.qml 2015-10-16 15:16:36 +0000 | |||
357 | @@ -0,0 +1,132 @@ | |||
358 | 1 | /* | ||
359 | 2 | * Copyright 2015 Canonical Ltd. | ||
360 | 3 | * | ||
361 | 4 | * This file is part of webbrowser-app. | ||
362 | 5 | * | ||
363 | 6 | * webbrowser-app is free software; you can redistribute it and/or modify | ||
364 | 7 | * it under the terms of the GNU General Public License as published by | ||
365 | 8 | * the Free Software Foundation; version 3. | ||
366 | 9 | * | ||
367 | 10 | * webbrowser-app is distributed in the hope that it will be useful, | ||
368 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
369 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
370 | 13 | * GNU General Public License for more details. | ||
371 | 14 | * | ||
372 | 15 | * You should have received a copy of the GNU General Public License | ||
373 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
374 | 17 | */ | ||
375 | 18 | |||
376 | 19 | import QtQuick 2.4 | ||
377 | 20 | import Ubuntu.Components 1.3 | ||
378 | 21 | import Ubuntu.Components.ListItems 1.3 as ListItems | ||
379 | 22 | |||
380 | 23 | FocusScope { | ||
381 | 24 | id: bookmarksView | ||
382 | 25 | |||
383 | 26 | property alias bookmarksModel: bookmarksFoldersView.model | ||
384 | 27 | property alias homepageUrl: bookmarksFoldersView.homeBookmarkUrl | ||
385 | 28 | |||
386 | 29 | signal bookmarkEntryClicked(url url) | ||
387 | 30 | signal done() | ||
388 | 31 | signal newTabClicked() | ||
389 | 32 | |||
390 | 33 | Rectangle { | ||
391 | 34 | anchors.fill: parent | ||
392 | 35 | color: "#f6f6f6" | ||
393 | 36 | } | ||
394 | 37 | |||
395 | 38 | BookmarksFoldersView { | ||
396 | 39 | id: bookmarksFoldersView | ||
397 | 40 | |||
398 | 41 | anchors { | ||
399 | 42 | top: topBar.bottom | ||
400 | 43 | left: parent.left | ||
401 | 44 | right: parent.right | ||
402 | 45 | bottom: toolbar.top | ||
403 | 46 | rightMargin: units.gu(2) | ||
404 | 47 | } | ||
405 | 48 | |||
406 | 49 | interactive: true | ||
407 | 50 | focus: true | ||
408 | 51 | |||
409 | 52 | onBookmarkClicked: bookmarksView.bookmarkEntryClicked(url) | ||
410 | 53 | onBookmarkRemoved: { | ||
411 | 54 | if (bookmarksModel.count == 1) { | ||
412 | 55 | done() | ||
413 | 56 | } | ||
414 | 57 | bookmarksModel.remove(url) | ||
415 | 58 | } | ||
416 | 59 | } | ||
417 | 60 | |||
418 | 61 | Toolbar { | ||
419 | 62 | id: topBar | ||
420 | 63 | |||
421 | 64 | height: units.gu(7) | ||
422 | 65 | color: "#f7f7f7" | ||
423 | 66 | |||
424 | 67 | anchors { | ||
425 | 68 | left: parent.left | ||
426 | 69 | right: parent.right | ||
427 | 70 | top: parent.top | ||
428 | 71 | } | ||
429 | 72 | |||
430 | 73 | Label { | ||
431 | 74 | anchors { | ||
432 | 75 | top: parent.top | ||
433 | 76 | left: parent.left | ||
434 | 77 | topMargin: units.gu(2) | ||
435 | 78 | leftMargin: units.gu(2) | ||
436 | 79 | } | ||
437 | 80 | |||
438 | 81 | text: i18n.tr("Bookmarks") | ||
439 | 82 | } | ||
440 | 83 | |||
441 | 84 | ListItems.ThinDivider { | ||
442 | 85 | anchors { | ||
443 | 86 | left: parent.left | ||
444 | 87 | right: parent.right | ||
445 | 88 | bottom: parent.bottom | ||
446 | 89 | } | ||
447 | 90 | } | ||
448 | 91 | } | ||
449 | 92 | |||
450 | 93 | Toolbar { | ||
451 | 94 | id: toolbar | ||
452 | 95 | height: units.gu(7) | ||
453 | 96 | |||
454 | 97 | anchors { | ||
455 | 98 | left: parent.left | ||
456 | 99 | right: parent.right | ||
457 | 100 | bottom: parent.bottom | ||
458 | 101 | } | ||
459 | 102 | |||
460 | 103 | Button { | ||
461 | 104 | objectName: "doneButton" | ||
462 | 105 | anchors { | ||
463 | 106 | left: parent.left | ||
464 | 107 | leftMargin: units.gu(2) | ||
465 | 108 | verticalCenter: parent.verticalCenter | ||
466 | 109 | } | ||
467 | 110 | |||
468 | 111 | strokeColor: UbuntuColors.darkGrey | ||
469 | 112 | |||
470 | 113 | text: i18n.tr("Done") | ||
471 | 114 | |||
472 | 115 | onClicked: bookmarksView.done() | ||
473 | 116 | } | ||
474 | 117 | |||
475 | 118 | ToolbarAction { | ||
476 | 119 | anchors { | ||
477 | 120 | right: parent.right | ||
478 | 121 | rightMargin: units.gu(2) | ||
479 | 122 | verticalCenter: parent.verticalCenter | ||
480 | 123 | } | ||
481 | 124 | height: parent.height - units.gu(2) | ||
482 | 125 | |||
483 | 126 | text: i18n.tr("New tab") | ||
484 | 127 | iconName: "tab-new" | ||
485 | 128 | |||
486 | 129 | onClicked: bookmarksView.newTabClicked() | ||
487 | 130 | } | ||
488 | 131 | } | ||
489 | 132 | } | ||
490 | 0 | 133 | ||
491 | === added file 'src/app/webbrowser/BookmarksViewWide.qml' | |||
492 | --- src/app/webbrowser/BookmarksViewWide.qml 1970-01-01 00:00:00 +0000 | |||
493 | +++ src/app/webbrowser/BookmarksViewWide.qml 2015-10-16 15:16:36 +0000 | |||
494 | @@ -0,0 +1,130 @@ | |||
495 | 1 | /* | ||
496 | 2 | * Copyright 2015 Canonical Ltd. | ||
497 | 3 | * | ||
498 | 4 | * This file is part of webbrowser-app. | ||
499 | 5 | * | ||
500 | 6 | * webbrowser-app is free software; you can redistribute it and/or modify | ||
501 | 7 | * it under the terms of the GNU General Public License as published by | ||
502 | 8 | * the Free Software Foundation; version 3. | ||
503 | 9 | * | ||
504 | 10 | * webbrowser-app is distributed in the hope that it will be useful, | ||
505 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
506 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
507 | 13 | * GNU General Public License for more details. | ||
508 | 14 | * | ||
509 | 15 | * You should have received a copy of the GNU General Public License | ||
510 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
511 | 17 | */ | ||
512 | 18 | |||
513 | 19 | import QtQuick 2.4 | ||
514 | 20 | import Ubuntu.Components 1.3 | ||
515 | 21 | import Ubuntu.Components.ListItems 1.3 as ListItems | ||
516 | 22 | |||
517 | 23 | FocusScope { | ||
518 | 24 | id: bookmarksViewWide | ||
519 | 25 | |||
520 | 26 | property alias bookmarksModel: bookmarksFoldersViewWide.model | ||
521 | 27 | property alias homepageUrl: bookmarksFoldersViewWide.homeBookmarkUrl | ||
522 | 28 | |||
523 | 29 | signal bookmarkEntryClicked(url url) | ||
524 | 30 | signal done() | ||
525 | 31 | signal newTabClicked() | ||
526 | 32 | |||
527 | 33 | Rectangle { | ||
528 | 34 | anchors.fill: parent | ||
529 | 35 | color: "#f6f6f6" | ||
530 | 36 | } | ||
531 | 37 | |||
532 | 38 | BookmarksFoldersViewWide { | ||
533 | 39 | id: bookmarksFoldersViewWide | ||
534 | 40 | |||
535 | 41 | anchors { | ||
536 | 42 | top: topBar.bottom | ||
537 | 43 | left: parent.left | ||
538 | 44 | right: parent.right | ||
539 | 45 | bottom: toolbar.top | ||
540 | 46 | } | ||
541 | 47 | |||
542 | 48 | focus: true | ||
543 | 49 | |||
544 | 50 | onBookmarkClicked: bookmarksViewWide.bookmarkEntryClicked(url) | ||
545 | 51 | onBookmarkRemoved: { | ||
546 | 52 | if (bookmarksModel.count == 1) { | ||
547 | 53 | done() | ||
548 | 54 | } | ||
549 | 55 | bookmarksModel.remove(url) | ||
550 | 56 | } | ||
551 | 57 | } | ||
552 | 58 | |||
553 | 59 | Toolbar { | ||
554 | 60 | id: topBar | ||
555 | 61 | |||
556 | 62 | height: units.gu(7) | ||
557 | 63 | color: "#f7f7f7" | ||
558 | 64 | |||
559 | 65 | anchors { | ||
560 | 66 | left: parent.left | ||
561 | 67 | right: parent.right | ||
562 | 68 | top: parent.top | ||
563 | 69 | } | ||
564 | 70 | |||
565 | 71 | Label { | ||
566 | 72 | anchors { | ||
567 | 73 | top: parent.top | ||
568 | 74 | left: parent.left | ||
569 | 75 | topMargin: units.gu(2) | ||
570 | 76 | leftMargin: units.gu(2) | ||
571 | 77 | } | ||
572 | 78 | |||
573 | 79 | text: i18n.tr("Bookmarks") | ||
574 | 80 | } | ||
575 | 81 | |||
576 | 82 | ListItems.ThinDivider { | ||
577 | 83 | anchors { | ||
578 | 84 | left: parent.left | ||
579 | 85 | right: parent.right | ||
580 | 86 | bottom: parent.bottom | ||
581 | 87 | } | ||
582 | 88 | } | ||
583 | 89 | } | ||
584 | 90 | |||
585 | 91 | Toolbar { | ||
586 | 92 | id: toolbar | ||
587 | 93 | height: units.gu(7) | ||
588 | 94 | |||
589 | 95 | anchors { | ||
590 | 96 | left: parent.left | ||
591 | 97 | right: parent.right | ||
592 | 98 | bottom: parent.bottom | ||
593 | 99 | } | ||
594 | 100 | |||
595 | 101 | Button { | ||
596 | 102 | objectName: "doneButton" | ||
597 | 103 | anchors { | ||
598 | 104 | left: parent.left | ||
599 | 105 | leftMargin: units.gu(2) | ||
600 | 106 | verticalCenter: parent.verticalCenter | ||
601 | 107 | } | ||
602 | 108 | |||
603 | 109 | strokeColor: UbuntuColors.darkGrey | ||
604 | 110 | |||
605 | 111 | text: i18n.tr("Done") | ||
606 | 112 | |||
607 | 113 | onClicked: bookmarksViewWide.done() | ||
608 | 114 | } | ||
609 | 115 | |||
610 | 116 | ToolbarAction { | ||
611 | 117 | anchors { | ||
612 | 118 | right: parent.right | ||
613 | 119 | rightMargin: units.gu(2) | ||
614 | 120 | verticalCenter: parent.verticalCenter | ||
615 | 121 | } | ||
616 | 122 | height: parent.height - units.gu(2) | ||
617 | 123 | |||
618 | 124 | text: i18n.tr("New tab") | ||
619 | 125 | iconName: "tab-new" | ||
620 | 126 | |||
621 | 127 | onClicked: bookmarksViewWide.newTabClicked() | ||
622 | 128 | } | ||
623 | 129 | } | ||
624 | 130 | } | ||
625 | 0 | 131 | ||
626 | === modified file 'src/app/webbrowser/Browser.qml' | |||
627 | --- src/app/webbrowser/Browser.qml 2015-10-13 12:57:33 +0000 | |||
628 | +++ src/app/webbrowser/Browser.qml 2015-10-16 15:16:36 +0000 | |||
629 | @@ -140,7 +140,7 @@ | |||
630 | 140 | 140 | ||
631 | 141 | FocusScope { | 141 | FocusScope { |
632 | 142 | anchors.fill: parent | 142 | anchors.fill: parent |
634 | 143 | visible: !settingsContainer.visible && !historyViewLoader.active | 143 | visible: !settingsContainer.visible && !historyViewLoader.active && !bookmarksViewLoader.active |
635 | 144 | 144 | ||
636 | 145 | TabChrome { | 145 | TabChrome { |
637 | 146 | id: invisibleTabChrome | 146 | id: invisibleTabChrome |
638 | @@ -368,6 +368,13 @@ | |||
639 | 368 | onTriggered: internal.shareLink(browser.currentWebview.url, browser.currentWebview.title) | 368 | onTriggered: internal.shareLink(browser.currentWebview.url, browser.currentWebview.title) |
640 | 369 | }, | 369 | }, |
641 | 370 | Action { | 370 | Action { |
642 | 371 | objectName: "bookmarks" | ||
643 | 372 | text: i18n.tr("Bookmarks") | ||
644 | 373 | iconName: "bookmark" | ||
645 | 374 | enabled: browser.bookmarksModel | ||
646 | 375 | onTriggered: bookmarksViewLoader.active = true | ||
647 | 376 | }, | ||
648 | 377 | Action { | ||
649 | 371 | objectName: "history" | 378 | objectName: "history" |
650 | 372 | text: i18n.tr("History") | 379 | text: i18n.tr("History") |
651 | 373 | iconName: "history" | 380 | iconName: "history" |
652 | @@ -759,6 +766,67 @@ | |||
653 | 759 | } | 766 | } |
654 | 760 | 767 | ||
655 | 761 | Loader { | 768 | Loader { |
656 | 769 | id: bookmarksViewLoader | ||
657 | 770 | |||
658 | 771 | anchors.fill: parent | ||
659 | 772 | active: false | ||
660 | 773 | sourceComponent: browser.wide ? bookmarksViewWideComponent : bookmarksViewComponent | ||
661 | 774 | |||
662 | 775 | onStatusChanged: { | ||
663 | 776 | if (status == Loader.Ready) { | ||
664 | 777 | bookmarksViewTimer.restart() | ||
665 | 778 | bookmarksViewLoader.item.forceActiveFocus() | ||
666 | 779 | } else { | ||
667 | 780 | internal.resetFocus() | ||
668 | 781 | } | ||
669 | 782 | } | ||
670 | 783 | |||
671 | 784 | Keys.onEscapePressed: bookmarksViewLoader.active = false | ||
672 | 785 | |||
673 | 786 | Connections { | ||
674 | 787 | target: bookmarksViewLoader.item | ||
675 | 788 | |||
676 | 789 | onBookmarkEntryClicked: { | ||
677 | 790 | browser.openUrlInNewTab(url, true) | ||
678 | 791 | bookmarksViewLoader.active = false | ||
679 | 792 | } | ||
680 | 793 | onDone: bookmarksViewLoader.active = false | ||
681 | 794 | onNewTabClicked: { | ||
682 | 795 | browser.openUrlInNewTab("", true) | ||
683 | 796 | bookmarksViewLoader.active = false | ||
684 | 797 | } | ||
685 | 798 | } | ||
686 | 799 | |||
687 | 800 | Timer { | ||
688 | 801 | id: bookmarksViewTimer | ||
689 | 802 | // Set the model asynchronously to ensure | ||
690 | 803 | // the view is displayed as early as possible. | ||
691 | 804 | interval: 1 | ||
692 | 805 | onTriggered: bookmarksViewLoader.item.bookmarksModel = browser.bookmarksModel | ||
693 | 806 | } | ||
694 | 807 | |||
695 | 808 | Component { | ||
696 | 809 | id: bookmarksViewComponent | ||
697 | 810 | |||
698 | 811 | BookmarksView { | ||
699 | 812 | anchors.fill: parent | ||
700 | 813 | |||
701 | 814 | homepageUrl: settings.homepage | ||
702 | 815 | } | ||
703 | 816 | } | ||
704 | 817 | |||
705 | 818 | Component { | ||
706 | 819 | id: bookmarksViewWideComponent | ||
707 | 820 | |||
708 | 821 | BookmarksViewWide { | ||
709 | 822 | anchors.fill: parent | ||
710 | 823 | |||
711 | 824 | homepageUrl: settings.homepage | ||
712 | 825 | } | ||
713 | 826 | } | ||
714 | 827 | } | ||
715 | 828 | |||
716 | 829 | Loader { | ||
717 | 762 | id: historyViewLoader | 830 | id: historyViewLoader |
718 | 763 | 831 | ||
719 | 764 | anchors.fill: parent | 832 | anchors.fill: parent |
720 | @@ -1653,10 +1721,13 @@ | |||
721 | 1653 | KeyboardShortcut { | 1721 | KeyboardShortcut { |
722 | 1654 | modifiers: Qt.ControlModifier | 1722 | modifiers: Qt.ControlModifier |
723 | 1655 | key: Qt.Key_T | 1723 | key: Qt.Key_T |
725 | 1656 | enabled: chrome.visible || recentView.visible | 1724 | enabled: chrome.visible || recentView.visible || bookmarksViewLoader.active || historyViewLoader.active |
726 | 1657 | onTriggered: { | 1725 | onTriggered: { |
727 | 1658 | openUrlInNewTab("", true) | 1726 | openUrlInNewTab("", true) |
728 | 1659 | if (recentView.visible) recentView.reset() | 1727 | if (recentView.visible) recentView.reset() |
729 | 1728 | |||
730 | 1729 | bookmarksViewLoader.active = false | ||
731 | 1730 | historyViewLoader.active = false | ||
732 | 1660 | } | 1731 | } |
733 | 1661 | } | 1732 | } |
734 | 1662 | 1733 | ||
735 | @@ -1703,6 +1774,14 @@ | |||
736 | 1703 | onTriggered: historyViewLoader.active = true | 1774 | onTriggered: historyViewLoader.active = true |
737 | 1704 | } | 1775 | } |
738 | 1705 | 1776 | ||
739 | 1777 | // Ctrl+Shift+O: Show Bookmarks | ||
740 | 1778 | KeyboardShortcut { | ||
741 | 1779 | modifiers: Qt.ControlModifier | Qt.ShiftModifier | ||
742 | 1780 | key: Qt.Key_O | ||
743 | 1781 | enabled: chrome.visible | ||
744 | 1782 | onTriggered: bookmarksViewLoader.active = true | ||
745 | 1783 | } | ||
746 | 1784 | |||
747 | 1706 | // Alt+← or Backspace: Goes to the previous page in history | 1785 | // Alt+← or Backspace: Goes to the previous page in history |
748 | 1707 | KeyboardShortcut { | 1786 | KeyboardShortcut { |
749 | 1708 | modifiers: Qt.AltModifier | 1787 | modifiers: Qt.AltModifier |
750 | @@ -1747,7 +1826,7 @@ | |||
751 | 1747 | KeyboardShortcut { | 1826 | KeyboardShortcut { |
752 | 1748 | modifiers: Qt.ControlModifier | 1827 | modifiers: Qt.ControlModifier |
753 | 1749 | key: Qt.Key_F | 1828 | key: Qt.Key_F |
755 | 1750 | enabled: !newTabViewLoader.active | 1829 | enabled: !newTabViewLoader.active && !bookmarksViewLoader.active |
756 | 1751 | onTriggered: { | 1830 | onTriggered: { |
757 | 1752 | chrome.findInPageMode = true | 1831 | chrome.findInPageMode = true |
758 | 1753 | chrome.focus = true | 1832 | chrome.focus = true |
759 | 1754 | 1833 | ||
760 | === modified file 'src/app/webbrowser/HistoryView.qml' | |||
761 | --- src/app/webbrowser/HistoryView.qml 2015-08-31 12:50:16 +0000 | |||
762 | +++ src/app/webbrowser/HistoryView.qml 2015-10-16 15:16:36 +0000 | |||
763 | @@ -18,6 +18,7 @@ | |||
764 | 18 | 18 | ||
765 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
766 | 20 | import Ubuntu.Components 1.3 | 20 | import Ubuntu.Components 1.3 |
767 | 21 | import Ubuntu.Components.ListItems 1.3 as ListItems | ||
768 | 21 | import webbrowserapp.private 0.1 | 22 | import webbrowserapp.private 0.1 |
769 | 22 | 23 | ||
770 | 23 | Item { | 24 | Item { |
771 | @@ -136,11 +137,12 @@ | |||
772 | 136 | } | 137 | } |
773 | 137 | } | 138 | } |
774 | 138 | 139 | ||
776 | 139 | Item { | 140 | Toolbar { |
777 | 140 | id: topBar | 141 | id: topBar |
778 | 141 | 142 | ||
779 | 142 | visible: domainsListView.ViewItems.selectMode | 143 | visible: domainsListView.ViewItems.selectMode |
781 | 143 | height: visible ? units.gu(5) : 0 | 144 | height: visible ? units.gu(7) : 0 |
782 | 145 | color: "#f7f7f7" | ||
783 | 144 | 146 | ||
784 | 145 | Behavior on height { | 147 | Behavior on height { |
785 | 146 | UbuntuNumberAnimation {} | 148 | UbuntuNumberAnimation {} |
786 | @@ -152,91 +154,76 @@ | |||
787 | 152 | top: parent.top | 154 | top: parent.top |
788 | 153 | } | 155 | } |
789 | 154 | 156 | ||
797 | 155 | Rectangle { | 157 | ToolbarAction { |
798 | 156 | width: parent.width | 158 | iconName: "close" |
799 | 157 | height: parent.height + units.gu(1.5) | 159 | text: i18n.tr("Cancel") |
800 | 158 | color: "white" | 160 | |
801 | 159 | } | 161 | onClicked: domainsListView.ViewItems.selectMode = false |
802 | 160 | 162 | ||
796 | 161 | Item { | ||
803 | 162 | anchors { | 163 | anchors { |
804 | 163 | top: parent.top | ||
805 | 164 | left: parent.left | 164 | left: parent.left |
806 | 165 | leftMargin: units.gu(2) | 165 | leftMargin: units.gu(2) |
807 | 166 | } | ||
808 | 167 | |||
809 | 168 | height: parent.height - units.gu(2) | ||
810 | 169 | } | ||
811 | 170 | |||
812 | 171 | ToolbarAction { | ||
813 | 172 | iconName: "select" | ||
814 | 173 | text: i18n.tr("Select all") | ||
815 | 174 | |||
816 | 175 | onClicked: { | ||
817 | 176 | if (domainsListView.ViewItems.selectedIndices.length === domainsListView.count) { | ||
818 | 177 | domainsListView.ViewItems.selectedIndices = [] | ||
819 | 178 | } else { | ||
820 | 179 | var indices = [] | ||
821 | 180 | for (var i = 0; i < domainsListView.count; ++i) { | ||
822 | 181 | indices.push(i) | ||
823 | 182 | } | ||
824 | 183 | domainsListView.ViewItems.selectedIndices = indices | ||
825 | 184 | } | ||
826 | 185 | } | ||
827 | 186 | |||
828 | 187 | anchors { | ||
829 | 188 | right: deleteButton.left | ||
830 | 189 | rightMargin: units.gu(2) | ||
831 | 190 | } | ||
832 | 191 | |||
833 | 192 | height: parent.height - units.gu(2) | ||
834 | 193 | } | ||
835 | 194 | |||
836 | 195 | ToolbarAction { | ||
837 | 196 | id: deleteButton | ||
838 | 197 | |||
839 | 198 | iconName: "delete" | ||
840 | 199 | text: i18n.tr("Delete") | ||
841 | 200 | enabled: domainsListView.ViewItems.selectedIndices.length > 0 | ||
842 | 201 | |||
843 | 202 | onClicked: { | ||
844 | 203 | var indices = domainsListView.ViewItems.selectedIndices | ||
845 | 204 | var domains = [] | ||
846 | 205 | for (var i in indices) { | ||
847 | 206 | domains.push(domainsListView.model.get(indices[i])) | ||
848 | 207 | } | ||
849 | 208 | domainsListView.ViewItems.selectMode = false | ||
850 | 209 | for (var j in domains) { | ||
851 | 210 | HistoryModel.removeEntriesByDomain(domains[j]) | ||
852 | 211 | } | ||
853 | 212 | } | ||
854 | 213 | |||
855 | 214 | anchors { | ||
856 | 215 | right: parent.right | ||
857 | 216 | rightMargin: units.gu(2) | ||
858 | 217 | } | ||
859 | 218 | |||
860 | 219 | height: parent.height - units.gu(2) | ||
861 | 220 | } | ||
862 | 221 | |||
863 | 222 | ListItems.ThinDivider { | ||
864 | 223 | anchors { | ||
865 | 224 | left: parent.left | ||
866 | 225 | right: parent.right | ||
867 | 166 | bottom: parent.bottom | 226 | bottom: parent.bottom |
868 | 167 | right: parent.right | ||
869 | 168 | rightMargin: units.gu(2) | ||
870 | 169 | } | ||
871 | 170 | |||
872 | 171 | ToolbarAction { | ||
873 | 172 | iconName: "close" | ||
874 | 173 | text: i18n.tr("Cancel") | ||
875 | 174 | |||
876 | 175 | MouseArea { | ||
877 | 176 | anchors.fill: parent | ||
878 | 177 | onClicked: domainsListView.ViewItems.selectMode = false | ||
879 | 178 | } | ||
880 | 179 | |||
881 | 180 | anchors.left: parent.left | ||
882 | 181 | |||
883 | 182 | height: parent.height | ||
884 | 183 | width: height | ||
885 | 184 | } | ||
886 | 185 | |||
887 | 186 | ToolbarAction { | ||
888 | 187 | iconName: "select" | ||
889 | 188 | text: i18n.tr("Select all") | ||
890 | 189 | |||
891 | 190 | MouseArea { | ||
892 | 191 | anchors.fill: parent | ||
893 | 192 | onClicked: { | ||
894 | 193 | if (domainsListView.ViewItems.selectedIndices.length === domainsListView.count) { | ||
895 | 194 | domainsListView.ViewItems.selectedIndices = [] | ||
896 | 195 | } else { | ||
897 | 196 | var indices = [] | ||
898 | 197 | for (var i = 0; i < domainsListView.count; ++i) { | ||
899 | 198 | indices.push(i) | ||
900 | 199 | } | ||
901 | 200 | domainsListView.ViewItems.selectedIndices = indices | ||
902 | 201 | } | ||
903 | 202 | } | ||
904 | 203 | } | ||
905 | 204 | |||
906 | 205 | anchors { | ||
907 | 206 | right: deleteButton.left | ||
908 | 207 | rightMargin: units.gu(2) | ||
909 | 208 | } | ||
910 | 209 | |||
911 | 210 | height: parent.height | ||
912 | 211 | width: height | ||
913 | 212 | } | ||
914 | 213 | |||
915 | 214 | ToolbarAction { | ||
916 | 215 | id: deleteButton | ||
917 | 216 | |||
918 | 217 | iconName: "delete" | ||
919 | 218 | text: i18n.tr("Delete") | ||
920 | 219 | enabled: domainsListView.ViewItems.selectedIndices.length > 0 | ||
921 | 220 | |||
922 | 221 | MouseArea { | ||
923 | 222 | anchors.fill: parent | ||
924 | 223 | onClicked: { | ||
925 | 224 | var indices = domainsListView.ViewItems.selectedIndices | ||
926 | 225 | var domains = [] | ||
927 | 226 | for (var i in indices) { | ||
928 | 227 | domains.push(domainsListView.model.get(indices[i])) | ||
929 | 228 | } | ||
930 | 229 | domainsListView.ViewItems.selectMode = false | ||
931 | 230 | for (var j in domains) { | ||
932 | 231 | HistoryModel.removeEntriesByDomain(domains[j]) | ||
933 | 232 | } | ||
934 | 233 | } | ||
935 | 234 | } | ||
936 | 235 | |||
937 | 236 | anchors.right: parent.right | ||
938 | 237 | |||
939 | 238 | height: parent.height | ||
940 | 239 | width: height | ||
941 | 240 | } | 227 | } |
942 | 241 | } | 228 | } |
943 | 242 | } | 229 | } |
944 | 243 | 230 | ||
945 | === modified file 'src/app/webbrowser/HistoryViewWide.qml' | |||
946 | --- src/app/webbrowser/HistoryViewWide.qml 2015-10-08 08:50:59 +0000 | |||
947 | +++ src/app/webbrowser/HistoryViewWide.qml 2015-10-16 15:16:36 +0000 | |||
948 | @@ -346,6 +346,7 @@ | |||
949 | 346 | id: topBar | 346 | id: topBar |
950 | 347 | 347 | ||
951 | 348 | height: units.gu(7) | 348 | height: units.gu(7) |
952 | 349 | color: "#f7f7f7" | ||
953 | 349 | 350 | ||
954 | 350 | anchors { | 351 | anchors { |
955 | 351 | left: parent.left | 352 | left: parent.left |
956 | 352 | 353 | ||
957 | === modified file 'src/app/webbrowser/NewTabView.qml' | |||
958 | --- src/app/webbrowser/NewTabView.qml 2015-10-12 12:00:35 +0000 | |||
959 | +++ src/app/webbrowser/NewTabView.qml 2015-10-16 15:16:36 +0000 | |||
960 | @@ -148,9 +148,12 @@ | |||
961 | 148 | height: status == Loader.Ready ? item.height : 0 | 148 | height: status == Loader.Ready ? item.height : 0 |
962 | 149 | 149 | ||
963 | 150 | active: internal.seeMoreBookmarksView | 150 | active: internal.seeMoreBookmarksView |
965 | 151 | sourceComponent: BookmarksFolderListView { | 151 | |
966 | 152 | sourceComponent: BookmarksFoldersView { | ||
967 | 152 | model: newTabView.bookmarksModel | 153 | model: newTabView.bookmarksModel |
968 | 153 | 154 | ||
969 | 155 | homeBookmarkUrl: newTabView.settingsObject.homepage | ||
970 | 156 | |||
971 | 154 | onBookmarkClicked: newTabView.bookmarkClicked(url) | 157 | onBookmarkClicked: newTabView.bookmarkClicked(url) |
972 | 155 | onBookmarkRemoved: newTabView.bookmarkRemoved(url) | 158 | onBookmarkRemoved: newTabView.bookmarkRemoved(url) |
973 | 156 | } | 159 | } |
974 | 157 | 160 | ||
975 | === modified file 'src/app/webbrowser/NewTabViewWide.qml' | |||
976 | --- src/app/webbrowser/NewTabViewWide.qml 2015-10-05 10:10:29 +0000 | |||
977 | +++ src/app/webbrowser/NewTabViewWide.qml 2015-10-16 15:16:36 +0000 | |||
978 | @@ -26,7 +26,7 @@ | |||
979 | 26 | FocusScope { | 26 | FocusScope { |
980 | 27 | id: newTabViewWide | 27 | id: newTabViewWide |
981 | 28 | 28 | ||
983 | 29 | property QtObject bookmarksModel | 29 | property alias bookmarksModel: bookmarksFoldersViewWide.model |
984 | 30 | property QtObject settingsObject | 30 | property QtObject settingsObject |
985 | 31 | property alias selectedIndex: sections.selectedIndex | 31 | property alias selectedIndex: sections.selectedIndex |
986 | 32 | readonly property bool inBookmarksView: newTabViewWide.selectedIndex === 1 | 32 | readonly property bool inBookmarksView: newTabViewWide.selectedIndex === 1 |
987 | @@ -41,13 +41,10 @@ | |||
988 | 41 | onActiveFocusChanged: { | 41 | onActiveFocusChanged: { |
989 | 42 | if (activeFocus) { | 42 | if (activeFocus) { |
990 | 43 | if (inBookmarksView) { | 43 | if (inBookmarksView) { |
996 | 44 | if (sections.lastFocusedBookmarksColumn === bookmarksList && | 44 | bookmarksFoldersViewWide.restoreLastFocusedColumn() |
997 | 45 | bookmarksList.model.length === 0) { | 45 | } else { |
998 | 46 | sections.lastFocusedBookmarksColumn = folders | 46 | topSitesList.focus = true |
994 | 47 | } | ||
995 | 48 | sections.lastFocusedBookmarksColumn.focus = true | ||
999 | 49 | } | 47 | } |
1000 | 50 | else topSitesList.focus = true | ||
1001 | 51 | } | 48 | } |
1002 | 52 | } | 49 | } |
1003 | 53 | 50 | ||
1004 | @@ -62,178 +59,38 @@ | |||
1005 | 62 | } | 59 | } |
1006 | 63 | } | 60 | } |
1007 | 64 | 61 | ||
1008 | 62 | BookmarksFoldersViewWide { | ||
1009 | 63 | id: bookmarksFoldersViewWide | ||
1010 | 64 | |||
1011 | 65 | Keys.onUpPressed: newTabViewWide.releasingKeyboardFocus() | ||
1012 | 66 | onBookmarkClicked: newTabViewWide.bookmarkClicked(url) | ||
1013 | 67 | onBookmarkRemoved: newTabViewWide.bookmarkRemoved(url) | ||
1014 | 68 | |||
1015 | 69 | // Relinquish focus as the presses and releases that compose the | ||
1016 | 70 | // drag will move the keyboard focus in a location unexpected | ||
1017 | 71 | // for the user. This way it will go back to the address bar and | ||
1018 | 72 | // the user can predictably resume keyboard interaction from there. | ||
1019 | 73 | onDragStarted: newTabViewWide.releasingKeyboardFocus() | ||
1020 | 74 | |||
1021 | 75 | anchors { | ||
1022 | 76 | top: sectionsGroup.bottom | ||
1023 | 77 | left: parent.left | ||
1024 | 78 | right: parent.right | ||
1025 | 79 | bottom: parent.bottom | ||
1026 | 80 | topMargin: units.gu(2) | ||
1027 | 81 | rightMargin: units.gu(2) | ||
1028 | 82 | } | ||
1029 | 83 | |||
1030 | 84 | visible: inBookmarksView | ||
1031 | 85 | homeBookmarkUrl: newTabViewWide.settingsObject.homepage | ||
1032 | 86 | } | ||
1033 | 87 | |||
1034 | 65 | Rectangle { | 88 | Rectangle { |
1035 | 66 | anchors.fill: parent | 89 | anchors.fill: parent |
1036 | 90 | visible: !inBookmarksView | ||
1037 | 67 | color: "#fbfbfb" | 91 | color: "#fbfbfb" |
1038 | 68 | } | 92 | } |
1039 | 69 | 93 | ||
1040 | 70 | ListView { | ||
1041 | 71 | id: folders | ||
1042 | 72 | objectName: "foldersList" | ||
1043 | 73 | visible: inBookmarksView | ||
1044 | 74 | |||
1045 | 75 | Keys.onRightPressed: if (bookmarksList.model.length > 0) bookmarksList.focus = true | ||
1046 | 76 | Keys.onDownPressed: currentIndex = Math.min(currentIndex + 1, folders.model.count - 1) | ||
1047 | 77 | Keys.onUpPressed: { | ||
1048 | 78 | if (currentIndex > 0) currentIndex = Math.max(currentIndex - 1, 0) | ||
1049 | 79 | else newTabViewWide.releasingKeyboardFocus() | ||
1050 | 80 | } | ||
1051 | 81 | onActiveFocusChanged: { | ||
1052 | 82 | if (activeFocus) { | ||
1053 | 83 | sections.lastFocusedBookmarksColumn = folders | ||
1054 | 84 | if (currentIndex < 0) currentIndex = 0 | ||
1055 | 85 | } | ||
1056 | 86 | } | ||
1057 | 87 | |||
1058 | 88 | anchors { | ||
1059 | 89 | top: sectionsGroup.bottom | ||
1060 | 90 | bottom: parent.bottom | ||
1061 | 91 | left: parent.left | ||
1062 | 92 | topMargin: units.gu(2) | ||
1063 | 93 | } | ||
1064 | 94 | width: units.gu(25) | ||
1065 | 95 | |||
1066 | 96 | currentIndex: 0 | ||
1067 | 97 | model: BookmarksFolderListModel { | ||
1068 | 98 | sourceModel: newTabViewWide.bookmarksModel | ||
1069 | 99 | } | ||
1070 | 100 | |||
1071 | 101 | delegate: ListItem { | ||
1072 | 102 | id: folderItem | ||
1073 | 103 | objectName: "folderItem" | ||
1074 | 104 | property var model: entries | ||
1075 | 105 | property bool isActiveFolder: ListView.isCurrentItem | ||
1076 | 106 | property bool isCurrentItem: ListView.isCurrentItem | ||
1077 | 107 | property bool isAllBookmarksFolder: folder.length === 0 | ||
1078 | 108 | property alias name: dropArea.folderName | ||
1079 | 109 | divider.visible: false | ||
1080 | 110 | |||
1081 | 111 | property bool isCurrentDropTarget: dropArea.containsDrag && dropArea.drag.source.folder !== folder | ||
1082 | 112 | color: isCurrentDropTarget ? "green" : | ||
1083 | 113 | ((folders.activeFocus && isActiveFolder) ? Qt.rgba(0, 0, 0, 0.05) : "transparent") | ||
1084 | 114 | |||
1085 | 115 | Label { | ||
1086 | 116 | anchors.verticalCenter: parent.verticalCenter | ||
1087 | 117 | anchors.left: parent.left | ||
1088 | 118 | anchors.right: parent.right | ||
1089 | 119 | anchors.leftMargin: units.gu(2) | ||
1090 | 120 | anchors.rightMargin: units.gu(2) | ||
1091 | 121 | |||
1092 | 122 | fontSize: isAllBookmarksFolder ? "medium" : "small" | ||
1093 | 123 | text: isAllBookmarksFolder ? i18n.tr("All Bookmarks") : folderItem.name | ||
1094 | 124 | color: isActiveFolder ? UbuntuColors.orange : UbuntuColors.darkGrey | ||
1095 | 125 | } | ||
1096 | 126 | |||
1097 | 127 | onClicked: folders.currentIndex = index | ||
1098 | 128 | |||
1099 | 129 | DropArea { | ||
1100 | 130 | id: dropArea | ||
1101 | 131 | anchors.fill: parent | ||
1102 | 132 | property string folderName: folder | ||
1103 | 133 | } | ||
1104 | 134 | } | ||
1105 | 135 | } | ||
1106 | 136 | |||
1107 | 137 | Scrollbar { | ||
1108 | 138 | flickableItem: folders | ||
1109 | 139 | } | ||
1110 | 140 | |||
1111 | 141 | ListView { | ||
1112 | 142 | id: bookmarksList | ||
1113 | 143 | objectName: "bookmarksList" | ||
1114 | 144 | anchors { | ||
1115 | 145 | top: sectionsGroup.bottom | ||
1116 | 146 | bottom: parent.bottom | ||
1117 | 147 | left: folders.right | ||
1118 | 148 | right: parent.right | ||
1119 | 149 | topMargin: units.gu(2) | ||
1120 | 150 | } | ||
1121 | 151 | visible: inBookmarksView | ||
1122 | 152 | onActiveFocusChanged: if (activeFocus) sections.lastFocusedBookmarksColumn = bookmarksList | ||
1123 | 153 | |||
1124 | 154 | // Build a temporary model for the bookmarks list that includes, when | ||
1125 | 155 | // necessary, the homepage bookmark as a fixed first item in the list | ||
1126 | 156 | model: { | ||
1127 | 157 | if (!folders.currentItem) return null | ||
1128 | 158 | |||
1129 | 159 | var items = [] | ||
1130 | 160 | if (folders.currentItem.isAllBookmarksFolder) items.push({ | ||
1131 | 161 | title: i18n.tr("Homepage"), | ||
1132 | 162 | url: newTabViewWide.settingsObject.homepage, | ||
1133 | 163 | folder: "" | ||
1134 | 164 | }) | ||
1135 | 165 | |||
1136 | 166 | if (!folders.currentItem.model) return null | ||
1137 | 167 | for (var i = 0; i < folders.currentItem.model.count; i++) { | ||
1138 | 168 | items.push(folders.currentItem.model.get(i)) | ||
1139 | 169 | } | ||
1140 | 170 | return items | ||
1141 | 171 | } | ||
1142 | 172 | |||
1143 | 173 | currentIndex: 0 | ||
1144 | 174 | |||
1145 | 175 | delegate: DraggableUrlDelegateWide { | ||
1146 | 176 | objectName: "bookmarkItem" | ||
1147 | 177 | clip: true | ||
1148 | 178 | |||
1149 | 179 | title: modelData.title | ||
1150 | 180 | icon: modelData.icon ? modelData.icon : "" | ||
1151 | 181 | url: modelData.url | ||
1152 | 182 | |||
1153 | 183 | property string folder: modelData.folder | ||
1154 | 184 | property bool isHomeBookmark: folder === "" && index === 0 | ||
1155 | 185 | |||
1156 | 186 | removable: !isHomeBookmark | ||
1157 | 187 | draggable: !isHomeBookmark && contentItem.x === 0 | ||
1158 | 188 | highlighted: bookmarksList.activeFocus && ListView.isCurrentItem | ||
1159 | 189 | |||
1160 | 190 | onClicked: newTabViewWide.bookmarkClicked(url) | ||
1161 | 191 | onRemoved: newTabViewWide.bookmarkRemoved(url) | ||
1162 | 192 | |||
1163 | 193 | // Larger margin to prevent interference from Scrollbar hovering area | ||
1164 | 194 | gripMargin: units.gu(4) | ||
1165 | 195 | onDragStarted: { | ||
1166 | 196 | // Remove interactivity to prevent the list from scrolling | ||
1167 | 197 | // while dragging near its margins. This ensures we can correctly | ||
1168 | 198 | // return the item to its original position on a failed drop. | ||
1169 | 199 | bookmarksList.interactive = false | ||
1170 | 200 | |||
1171 | 201 | // Relinquish focus as the presses and releases that compose the | ||
1172 | 202 | // drag will move the keyboard focus in a location unexpected | ||
1173 | 203 | // for the user. This way it will go back to the address bar and | ||
1174 | 204 | // the user can predictably resume keyboard interaction from there. | ||
1175 | 205 | newTabViewWide.releasingKeyboardFocus() | ||
1176 | 206 | } | ||
1177 | 207 | onDragEnded: { | ||
1178 | 208 | bookmarksList.interactive = true | ||
1179 | 209 | |||
1180 | 210 | if (dragAndDrop.target && dragAndDrop.target.folderName !== folder) { | ||
1181 | 211 | bookmarksModel.update(modelData.url, modelData.title, | ||
1182 | 212 | dragAndDrop.target.folderName) | ||
1183 | 213 | dragAndDrop.success = true | ||
1184 | 214 | } | ||
1185 | 215 | } | ||
1186 | 216 | } | ||
1187 | 217 | |||
1188 | 218 | Keys.onReturnPressed: newTabViewWide.bookmarkClicked(currentItem.url) | ||
1189 | 219 | Keys.onDeletePressed: { | ||
1190 | 220 | if (currentItem.removable) { | ||
1191 | 221 | newTabViewWide.bookmarkRemoved(currentItem.url) | ||
1192 | 222 | if (bookmarksList.model.length === 0) folders.focus = true | ||
1193 | 223 | } | ||
1194 | 224 | } | ||
1195 | 225 | Keys.onLeftPressed: folders.focus = true | ||
1196 | 226 | Keys.onDownPressed: currentIndex = Math.min(currentIndex + 1, model.length - 1) | ||
1197 | 227 | Keys.onUpPressed: { | ||
1198 | 228 | if (currentIndex > 0) currentIndex = Math.max(currentIndex - 1, 0) | ||
1199 | 229 | else newTabViewWide.releasingKeyboardFocus() | ||
1200 | 230 | } | ||
1201 | 231 | } | ||
1202 | 232 | |||
1203 | 233 | Scrollbar { | ||
1204 | 234 | flickableItem: bookmarksList | ||
1205 | 235 | } | ||
1206 | 236 | |||
1207 | 237 | UrlPreviewGrid { | 94 | UrlPreviewGrid { |
1208 | 238 | id: topSitesList | 95 | id: topSitesList |
1209 | 239 | objectName: "topSitesList" | 96 | objectName: "topSitesList" |
1210 | @@ -286,14 +143,12 @@ | |||
1211 | 286 | selectedIndex: settingsObject.newTabDefaultSection | 143 | selectedIndex: settingsObject.newTabDefaultSection |
1212 | 287 | onSelectedIndexChanged: { | 144 | onSelectedIndexChanged: { |
1213 | 288 | settingsObject.newTabDefaultSection = selectedIndex | 145 | settingsObject.newTabDefaultSection = selectedIndex |
1218 | 289 | if (selectedIndex === 0) topSitesList.focus = true | 146 | if (selectedIndex === 0) { |
1219 | 290 | else { | 147 | topSitesList.focus = true |
1220 | 291 | if (lastFocusedBookmarksColumn) lastFocusedBookmarksColumn.focus = true | 148 | } else { |
1221 | 292 | else folders.focus = true | 149 | bookmarksFoldersViewWide.restoreLastFocusedColumn() |
1222 | 293 | } | 150 | } |
1223 | 294 | |||
1224 | 295 | } | 151 | } |
1225 | 296 | property var lastFocusedBookmarksColumn: folders | ||
1226 | 297 | 152 | ||
1227 | 298 | actions: [ | 153 | actions: [ |
1228 | 299 | Action { text: i18n.tr("Top sites") }, | 154 | Action { text: i18n.tr("Top sites") }, |
1229 | 300 | 155 | ||
1230 | === modified file 'src/app/webbrowser/UrlDelegate.qml' | |||
1231 | --- src/app/webbrowser/UrlDelegate.qml 2015-08-11 21:35:55 +0000 | |||
1232 | +++ src/app/webbrowser/UrlDelegate.qml 2015-10-16 15:16:36 +0000 | |||
1233 | @@ -29,6 +29,8 @@ | |||
1234 | 29 | 29 | ||
1235 | 30 | property alias headerComponent: headerComponentLoader.sourceComponent | 30 | property alias headerComponent: headerComponentLoader.sourceComponent |
1236 | 31 | 31 | ||
1237 | 32 | property bool removable: true | ||
1238 | 33 | |||
1239 | 32 | divider.visible: false | 34 | divider.visible: false |
1240 | 33 | 35 | ||
1241 | 34 | signal removed() | 36 | signal removed() |
1242 | @@ -83,7 +85,8 @@ | |||
1243 | 83 | } | 85 | } |
1244 | 84 | } | 86 | } |
1245 | 85 | 87 | ||
1247 | 86 | leadingActions: ListItemActions { | 88 | ListItemActions { |
1248 | 89 | id: listItemActions | ||
1249 | 87 | actions: [ | 90 | actions: [ |
1250 | 88 | Action { | 91 | Action { |
1251 | 89 | objectName: "leadingAction.delete" | 92 | objectName: "leadingAction.delete" |
1252 | @@ -92,4 +95,6 @@ | |||
1253 | 92 | } | 95 | } |
1254 | 93 | ] | 96 | ] |
1255 | 94 | } | 97 | } |
1256 | 98 | |||
1257 | 99 | leadingActions: removable ? listItemActions : null | ||
1258 | 95 | } | 100 | } |
1259 | 96 | 101 | ||
1260 | === modified file 'src/app/webbrowser/UrlDelegateWide.qml' | |||
1261 | --- src/app/webbrowser/UrlDelegateWide.qml 2015-08-05 16:10:09 +0000 | |||
1262 | +++ src/app/webbrowser/UrlDelegateWide.qml 2015-10-16 15:16:36 +0000 | |||
1263 | @@ -32,7 +32,7 @@ | |||
1264 | 32 | color: highlighted ? Qt.rgba(0, 0, 0, 0.05) : "transparent" | 32 | color: highlighted ? Qt.rgba(0, 0, 0, 0.05) : "transparent" |
1265 | 33 | 33 | ||
1266 | 34 | divider.visible: false | 34 | divider.visible: false |
1268 | 35 | height: units.gu(7) | 35 | height: units.gu(5) |
1269 | 36 | 36 | ||
1270 | 37 | signal removed() | 37 | signal removed() |
1271 | 38 | 38 | ||
1272 | @@ -56,7 +56,7 @@ | |||
1273 | 56 | Label { | 56 | Label { |
1274 | 57 | id: title | 57 | id: title |
1275 | 58 | 58 | ||
1277 | 59 | fontSize: "small" | 59 | fontSize: "x-small" |
1278 | 60 | color: highlighted ? UbuntuColors.orange : UbuntuColors.darkGrey | 60 | color: highlighted ? UbuntuColors.orange : UbuntuColors.darkGrey |
1279 | 61 | wrapMode: Text.Wrap | 61 | wrapMode: Text.Wrap |
1280 | 62 | elide: Text.ElideRight | 62 | elide: Text.ElideRight |
1281 | @@ -66,7 +66,7 @@ | |||
1282 | 66 | Label { | 66 | Label { |
1283 | 67 | id: url | 67 | id: url |
1284 | 68 | 68 | ||
1286 | 69 | fontSize: "small" | 69 | fontSize: "xx-small" |
1287 | 70 | color: highlighted ? UbuntuColors.orange : UbuntuColors.darkGrey | 70 | color: highlighted ? UbuntuColors.orange : UbuntuColors.darkGrey |
1288 | 71 | wrapMode: Text.Wrap | 71 | wrapMode: Text.Wrap |
1289 | 72 | elide: Text.ElideRight | 72 | elide: Text.ElideRight |
1290 | 73 | 73 | ||
1291 | === modified file 'tests/autopilot/webbrowser_app/emulators/browser.py' | |||
1292 | --- tests/autopilot/webbrowser_app/emulators/browser.py 2015-10-08 15:26:18 +0000 | |||
1293 | +++ tests/autopilot/webbrowser_app/emulators/browser.py 2015-10-16 15:16:36 +0000 | |||
1294 | @@ -162,6 +162,17 @@ | |||
1295 | 162 | return self.wait_select_single("Dialog", | 162 | return self.wait_select_single("Dialog", |
1296 | 163 | objectName="newFolderDialog") | 163 | objectName="newFolderDialog") |
1297 | 164 | 164 | ||
1298 | 165 | # The bookmarks view is dynamically created, so it might or might not be | ||
1299 | 166 | # available | ||
1300 | 167 | def get_bookmarks_view(self): | ||
1301 | 168 | try: | ||
1302 | 169 | if self.wide: | ||
1303 | 170 | return self.select_single("BookmarksViewWide") | ||
1304 | 171 | else: | ||
1305 | 172 | return self.select_single("BookmarksView") | ||
1306 | 173 | except exceptions.StateNotFoundError: | ||
1307 | 174 | return None | ||
1308 | 175 | |||
1309 | 165 | # The history view is dynamically created, so it might or might not be | 176 | # The history view is dynamically created, so it might or might not be |
1310 | 166 | # available | 177 | # available |
1311 | 167 | def get_history_view(self): | 178 | def get_history_view(self): |
1312 | @@ -540,7 +551,7 @@ | |||
1313 | 540 | return self.get_top_sites_list().get_delegates() | 551 | return self.get_top_sites_list().get_delegates() |
1314 | 541 | 552 | ||
1315 | 542 | def get_bookmarks_folder_list_view(self): | 553 | def get_bookmarks_folder_list_view(self): |
1317 | 543 | return self.select_single(BookmarksFolderListView) | 554 | return self.wait_select_single(BookmarksFoldersView) |
1318 | 544 | 555 | ||
1319 | 545 | def get_bookmarks(self, folder_name): | 556 | def get_bookmarks(self, folder_name): |
1320 | 546 | # assumes that the "more" button has been clicked | 557 | # assumes that the "more" button has been clicked |
1321 | @@ -667,7 +678,7 @@ | |||
1322 | 667 | self.pointing_device.click_object(button) | 678 | self.pointing_device.click_object(button) |
1323 | 668 | 679 | ||
1324 | 669 | 680 | ||
1326 | 670 | class BookmarksFolderListView(uitk.UbuntuUIToolkitCustomProxyObjectBase): | 681 | class BookmarksFoldersView(uitk.UbuntuUIToolkitCustomProxyObjectBase): |
1327 | 671 | 682 | ||
1328 | 672 | def get_delegates(self): | 683 | def get_delegates(self): |
1329 | 673 | return sorted(self.select_many("QQuickItem", | 684 | return sorted(self.select_many("QQuickItem", |
1330 | 674 | 685 | ||
1331 | === modified file 'tests/autopilot/webbrowser_app/tests/__init__.py' | |||
1332 | --- tests/autopilot/webbrowser_app/tests/__init__.py 2015-10-08 09:34:48 +0000 | |||
1333 | +++ tests/autopilot/webbrowser_app/tests/__init__.py 2015-10-16 15:16:36 +0000 | |||
1334 | @@ -195,6 +195,15 @@ | |||
1335 | 195 | self.pointing_device.click_object(settings_action) | 195 | self.pointing_device.click_object(settings_action) |
1336 | 196 | return self.main_window.get_settings_page() | 196 | return self.main_window.get_settings_page() |
1337 | 197 | 197 | ||
1338 | 198 | def open_bookmarks(self): | ||
1339 | 199 | chrome = self.main_window.chrome | ||
1340 | 200 | drawer_button = chrome.get_drawer_button() | ||
1341 | 201 | self.pointing_device.click_object(drawer_button) | ||
1342 | 202 | chrome.get_drawer() | ||
1343 | 203 | bookmarks_action = chrome.get_drawer_action("bookmarks") | ||
1344 | 204 | self.pointing_device.click_object(bookmarks_action) | ||
1345 | 205 | return self.main_window.get_bookmarks_view() | ||
1346 | 206 | |||
1347 | 198 | def open_history(self): | 207 | def open_history(self): |
1348 | 199 | chrome = self.main_window.chrome | 208 | chrome = self.main_window.chrome |
1349 | 200 | drawer_button = chrome.get_drawer_button() | 209 | drawer_button = chrome.get_drawer_button() |
1350 | 201 | 210 | ||
1351 | === modified file 'tests/autopilot/webbrowser_app/tests/test_bookmark_options.py' | |||
1352 | --- tests/autopilot/webbrowser_app/tests/test_bookmark_options.py 2015-09-06 08:16:40 +0000 | |||
1353 | +++ tests/autopilot/webbrowser_app/tests/test_bookmark_options.py 2015-10-16 15:16:36 +0000 | |||
1354 | @@ -92,17 +92,18 @@ | |||
1355 | 92 | return self.main_window.get_bookmark_options() | 92 | return self.main_window.get_bookmark_options() |
1356 | 93 | 93 | ||
1357 | 94 | def _assert_bookmark_count_in_folder(self, tab, folder_name, count): | 94 | def _assert_bookmark_count_in_folder(self, tab, folder_name, count): |
1358 | 95 | # in wide mode the list of urls in the default folder has the homepage | ||
1359 | 96 | # bookmark in it, but it does not in narrow mode | ||
1360 | 97 | if self.main_window.wide and folder_name == "": | ||
1361 | 98 | count += 1 | ||
1362 | 99 | |||
1363 | 100 | urls = tab.get_bookmarks(folder_name) | 95 | urls = tab.get_bookmarks(folder_name) |
1364 | 101 | self.assertThat(lambda: len(urls), Eventually(Equals(count))) | 96 | self.assertThat(lambda: len(urls), Eventually(Equals(count))) |
1365 | 102 | 97 | ||
1366 | 98 | def _toggle_bookmark_folder(self, tab, folder_name): | ||
1367 | 99 | folders = tab.get_bookmarks_folder_list_view() | ||
1368 | 100 | folder_delegate = folders.get_folder_delegate(folder_name) | ||
1369 | 101 | self.pointing_device.click_object( | ||
1370 | 102 | folders.get_header_from_folder(folder_delegate)) | ||
1371 | 103 | |||
1372 | 103 | def test_save_bookmarked_url_in_default_folder(self): | 104 | def test_save_bookmarked_url_in_default_folder(self): |
1373 | 104 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) | 105 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) |
1375 | 105 | self._assert_bookmark_count_in_folder(new_tab, "", 4) | 106 | self._assert_bookmark_count_in_folder(new_tab, "", 5) |
1376 | 106 | 107 | ||
1377 | 107 | url = self.base_url + "/test2" | 108 | url = self.base_url + "/test2" |
1378 | 108 | self.main_window.go_to_url(url) | 109 | self.main_window.go_to_url(url) |
1379 | @@ -118,12 +119,14 @@ | |||
1380 | 118 | self.assertThat(chrome.bookmarked, Eventually(Equals(True))) | 119 | self.assertThat(chrome.bookmarked, Eventually(Equals(True))) |
1381 | 119 | 120 | ||
1382 | 120 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) | 121 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) |
1384 | 121 | self._assert_bookmark_count_in_folder(new_tab, "", 5) | 122 | self._assert_bookmark_count_in_folder(new_tab, "", 6) |
1385 | 122 | 123 | ||
1386 | 123 | def test_save_bookmarked_url_in_existing_folder(self): | 124 | def test_save_bookmarked_url_in_existing_folder(self): |
1387 | 124 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) | 125 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) |
1388 | 125 | self.assertThat(lambda: len(new_tab.get_folder_names()), | 126 | self.assertThat(lambda: len(new_tab.get_folder_names()), |
1389 | 126 | Eventually(Equals(3))) | 127 | Eventually(Equals(3))) |
1390 | 128 | if not self.main_window.wide: | ||
1391 | 129 | self._toggle_bookmark_folder(new_tab, "Actinide") | ||
1392 | 127 | self._assert_bookmark_count_in_folder(new_tab, "Actinide", 1) | 130 | self._assert_bookmark_count_in_folder(new_tab, "Actinide", 1) |
1393 | 128 | 131 | ||
1394 | 129 | url = self.base_url + "/test2" | 132 | url = self.base_url + "/test2" |
1395 | @@ -154,6 +157,8 @@ | |||
1396 | 154 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) | 157 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) |
1397 | 155 | self.assertThat(lambda: len(new_tab.get_folder_names()), | 158 | self.assertThat(lambda: len(new_tab.get_folder_names()), |
1398 | 156 | Eventually(Equals(3))) | 159 | Eventually(Equals(3))) |
1399 | 160 | if not self.main_window.wide: | ||
1400 | 161 | self._toggle_bookmark_folder(new_tab, "Actinide") | ||
1401 | 157 | self._assert_bookmark_count_in_folder(new_tab, "Actinide", 2) | 162 | self._assert_bookmark_count_in_folder(new_tab, "Actinide", 2) |
1402 | 158 | 163 | ||
1403 | 159 | def test_save_bookmarked_url_in_new_folder(self): | 164 | def test_save_bookmarked_url_in_new_folder(self): |
1404 | @@ -198,6 +203,8 @@ | |||
1405 | 198 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) | 203 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) |
1406 | 199 | self.assertThat(lambda: len(new_tab.get_folder_names()), | 204 | self.assertThat(lambda: len(new_tab.get_folder_names()), |
1407 | 200 | Eventually(Equals(4))) | 205 | Eventually(Equals(4))) |
1408 | 206 | if not self.main_window.wide: | ||
1409 | 207 | self._toggle_bookmark_folder(new_tab, "NewFolder") | ||
1410 | 201 | self._assert_bookmark_count_in_folder(new_tab, "NewFolder", 1) | 208 | self._assert_bookmark_count_in_folder(new_tab, "NewFolder", 1) |
1411 | 202 | 209 | ||
1412 | 203 | def test_set_bookmark_title(self): | 210 | def test_set_bookmark_title(self): |
1413 | @@ -223,12 +230,9 @@ | |||
1414 | 223 | self.assertThat(chrome.bookmarked, Eventually(Equals(True))) | 230 | self.assertThat(chrome.bookmarked, Eventually(Equals(True))) |
1415 | 224 | 231 | ||
1416 | 225 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) | 232 | new_tab = self.open_new_tab(open_tabs_view=True, expand_view=True) |
1418 | 226 | self._assert_bookmark_count_in_folder(new_tab, "", 5) | 233 | self._assert_bookmark_count_in_folder(new_tab, "", 6) |
1419 | 227 | 234 | ||
1424 | 228 | index = 0 | 235 | bookmark = new_tab.get_bookmarks("")[1] |
1421 | 229 | if self.main_window.wide: | ||
1422 | 230 | index += 1 | ||
1423 | 231 | bookmark = new_tab.get_bookmarks("")[index] | ||
1425 | 232 | self.assertThat(bookmark.title, Equals("NewTitle")) | 236 | self.assertThat(bookmark.title, Equals("NewTitle")) |
1426 | 233 | 237 | ||
1427 | 234 | def test_bookmark_options_from_contextual_menu(self): | 238 | def test_bookmark_options_from_contextual_menu(self): |
1428 | 235 | 239 | ||
1429 | === modified file 'tests/autopilot/webbrowser_app/tests/test_keyboard.py' | |||
1430 | --- tests/autopilot/webbrowser_app/tests/test_keyboard.py 2015-09-29 13:15:01 +0000 | |||
1431 | +++ tests/autopilot/webbrowser_app/tests/test_keyboard.py 2015-10-16 15:16:36 +0000 | |||
1432 | @@ -273,6 +273,39 @@ | |||
1433 | 273 | self.assertThat(lambda: self.main_window.get_current_webview().url, | 273 | self.assertThat(lambda: self.main_window.get_current_webview().url, |
1434 | 274 | Eventually(Equals(url))) | 274 | Eventually(Equals(url))) |
1435 | 275 | 275 | ||
1436 | 276 | def test_toggle_bookmarks(self): | ||
1437 | 277 | self.assertThat(self.main_window.get_bookmarks_view(), Equals(None)) | ||
1438 | 278 | self.main_window.press_key('Ctrl+Shift+O') | ||
1439 | 279 | self.assertThat(lambda: self.main_window.get_bookmarks_view(), | ||
1440 | 280 | Eventually(NotEquals(None))) | ||
1441 | 281 | bookmarks_view = self.main_window.get_bookmarks_view() | ||
1442 | 282 | |||
1443 | 283 | self.main_window.press_key('Escape') | ||
1444 | 284 | bookmarks_view.wait_until_destroyed() | ||
1445 | 285 | webview = self.main_window.get_current_webview() | ||
1446 | 286 | self.assertThat(webview.activeFocus, Eventually(Equals(True))) | ||
1447 | 287 | |||
1448 | 288 | def test_toggle_bookmarks_from_menu(self): | ||
1449 | 289 | self.assertThat(self.main_window.get_bookmarks_view(), Equals(None)) | ||
1450 | 290 | self.open_bookmarks() | ||
1451 | 291 | bookmarks_view = self.main_window.get_bookmarks_view() | ||
1452 | 292 | self.assertThat(bookmarks_view.activeFocus, Eventually(Equals(True))) | ||
1453 | 293 | |||
1454 | 294 | self.main_window.press_key('Escape') | ||
1455 | 295 | bookmarks_view.wait_until_destroyed() | ||
1456 | 296 | |||
1457 | 297 | def test_new_tab_from_bookmarks_view(self): | ||
1458 | 298 | self.assertThat(self.main_window.get_bookmarks_view(), Equals(None)) | ||
1459 | 299 | self.open_bookmarks() | ||
1460 | 300 | bookmarks_view = self.main_window.get_bookmarks_view() | ||
1461 | 301 | self.assertThat(bookmarks_view.activeFocus, Eventually(Equals(True))) | ||
1462 | 302 | |||
1463 | 303 | self.main_window.press_key('Ctrl+T') | ||
1464 | 304 | bookmarks_view.wait_until_destroyed() | ||
1465 | 305 | |||
1466 | 306 | new_tab_view = self.main_window.get_new_tab_view() | ||
1467 | 307 | self.assertThat(new_tab_view.visible, Eventually(Equals(True))) | ||
1468 | 308 | |||
1469 | 276 | def test_toggle_history(self): | 309 | def test_toggle_history(self): |
1470 | 277 | self.assertThat(self.main_window.get_history_view(), Equals(None)) | 310 | self.assertThat(self.main_window.get_history_view(), Equals(None)) |
1471 | 278 | self.main_window.press_key('Ctrl+H') | 311 | self.main_window.press_key('Ctrl+H') |
1472 | @@ -294,6 +327,18 @@ | |||
1473 | 294 | self.main_window.press_key('Escape') | 327 | self.main_window.press_key('Escape') |
1474 | 295 | history_view.wait_until_destroyed() | 328 | history_view.wait_until_destroyed() |
1475 | 296 | 329 | ||
1476 | 330 | def test_new_tab_from_history_view(self): | ||
1477 | 331 | self.assertThat(self.main_window.get_history_view(), Equals(None)) | ||
1478 | 332 | self.open_history() | ||
1479 | 333 | history_view = self.main_window.get_history_view() | ||
1480 | 334 | self.assertThat(history_view.activeFocus, Eventually(Equals(True))) | ||
1481 | 335 | |||
1482 | 336 | self.main_window.press_key('Ctrl+T') | ||
1483 | 337 | history_view.wait_until_destroyed() | ||
1484 | 338 | |||
1485 | 339 | new_tab_view = self.main_window.get_new_tab_view() | ||
1486 | 340 | self.assertThat(new_tab_view.visible, Eventually(Equals(True))) | ||
1487 | 341 | |||
1488 | 297 | def test_escape_settings(self): | 342 | def test_escape_settings(self): |
1489 | 298 | settings = self.open_settings() | 343 | settings = self.open_settings() |
1490 | 299 | self.main_window.press_key('Escape') | 344 | self.main_window.press_key('Escape') |
1491 | 300 | 345 | ||
1492 | === modified file 'tests/autopilot/webbrowser_app/tests/test_new_tab_view.py' | |||
1493 | --- tests/autopilot/webbrowser_app/tests/test_new_tab_view.py 2015-10-13 11:21:01 +0000 | |||
1494 | +++ tests/autopilot/webbrowser_app/tests/test_new_tab_view.py 2015-10-16 15:16:36 +0000 | |||
1495 | @@ -255,7 +255,7 @@ | |||
1496 | 255 | folder_delegate = folders.get_folder_delegate("") | 255 | folder_delegate = folders.get_folder_delegate("") |
1497 | 256 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 256 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1498 | 257 | folder_delegate)), | 257 | folder_delegate)), |
1500 | 258 | Eventually(Equals(4))) | 258 | Eventually(Equals(5))) |
1501 | 259 | bookmark = folders.get_urls_from_folder(folder_delegate)[0] | 259 | bookmark = folders.get_urls_from_folder(folder_delegate)[0] |
1502 | 260 | url = bookmark.url | 260 | url = bookmark.url |
1503 | 261 | self.pointing_device.click_object(bookmark) | 261 | self.pointing_device.click_object(bookmark) |
1504 | @@ -277,7 +277,7 @@ | |||
1505 | 277 | folder_delegate = folders.get_folder_delegate("") | 277 | folder_delegate = folders.get_folder_delegate("") |
1506 | 278 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 278 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1507 | 279 | folder_delegate)), | 279 | folder_delegate)), |
1509 | 280 | Eventually(Equals(4))) | 280 | Eventually(Equals(5))) |
1510 | 281 | self.assertThat(top_sites.visible, Eventually(Equals(False))) | 281 | self.assertThat(top_sites.visible, Eventually(Equals(False))) |
1511 | 282 | # Collapse again | 282 | # Collapse again |
1512 | 283 | self.assertThat(more_button.visible, Equals(True)) | 283 | self.assertThat(more_button.visible, Equals(True)) |
1513 | @@ -308,6 +308,12 @@ | |||
1514 | 308 | lambda: folders.get_urls_from_folder(folder_delegate)[0], | 308 | lambda: folders.get_urls_from_folder(folder_delegate)[0], |
1515 | 309 | Eventually(NotEquals(url))) | 309 | Eventually(NotEquals(url))) |
1516 | 310 | 310 | ||
1517 | 311 | def _toggle_bookmark_folder(self, folder): | ||
1518 | 312 | folders = self.new_tab_view.get_bookmarks_folder_list_view() | ||
1519 | 313 | folder_delegate = folders.get_folder_delegate(folder) | ||
1520 | 314 | self.pointing_device.click_object( | ||
1521 | 315 | folders.get_header_from_folder(folder_delegate)) | ||
1522 | 316 | |||
1523 | 311 | def test_remove_bookmarks_when_collapsed(self): | 317 | def test_remove_bookmarks_when_collapsed(self): |
1524 | 312 | bookmarks = self.new_tab_view.get_bookmarks_list() | 318 | bookmarks = self.new_tab_view.get_bookmarks_list() |
1525 | 313 | self.assertThat(lambda: len(bookmarks.get_delegates()), | 319 | self.assertThat(lambda: len(bookmarks.get_delegates()), |
1526 | @@ -327,10 +333,12 @@ | |||
1527 | 327 | folder_delegate = folders.get_folder_delegate("") | 333 | folder_delegate = folders.get_folder_delegate("") |
1528 | 328 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 334 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1529 | 329 | folder_delegate)), | 335 | folder_delegate)), |
1531 | 330 | Eventually(Equals(4))) | 336 | Eventually(Equals(5))) |
1532 | 331 | more_button = self.new_tab_view.get_bookmarks_more_button() | 337 | more_button = self.new_tab_view.get_bookmarks_more_button() |
1533 | 332 | top_sites = self.new_tab_view.get_top_sites_list() | 338 | top_sites = self.new_tab_view.get_top_sites_list() |
1534 | 339 | self._toggle_bookmark_folder("Actinide") | ||
1535 | 333 | self._remove_first_bookmark_from_folder("Actinide") | 340 | self._remove_first_bookmark_from_folder("Actinide") |
1536 | 341 | self._toggle_bookmark_folder("NobleGas") | ||
1537 | 334 | self._remove_first_bookmark_from_folder("NobleGas") | 342 | self._remove_first_bookmark_from_folder("NobleGas") |
1538 | 335 | self.assertThat(more_button.visible, Eventually(Equals(False))) | 343 | self.assertThat(more_button.visible, Eventually(Equals(False))) |
1539 | 336 | self.assertThat(top_sites.visible, Eventually(Equals(True))) | 344 | self.assertThat(top_sites.visible, Eventually(Equals(True))) |
1540 | @@ -345,15 +353,37 @@ | |||
1541 | 345 | folder_delegate = folders.get_folder_delegate("") | 353 | folder_delegate = folders.get_folder_delegate("") |
1542 | 346 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 354 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1543 | 347 | folder_delegate)), | 355 | folder_delegate)), |
1553 | 348 | Eventually(Equals(4))) | 356 | Eventually(Equals(5))) |
1554 | 349 | folder_delegate = folders.get_folder_delegate("Actinide") | 357 | self._toggle_bookmark_folder("Actinide") |
1555 | 350 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 358 | folder_delegate = folders.get_folder_delegate("Actinide") |
1556 | 351 | folder_delegate)), | 359 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1557 | 352 | Eventually(Equals(1))) | 360 | folder_delegate)), |
1558 | 353 | folder_delegate = folders.get_folder_delegate("NobleGas") | 361 | Eventually(Equals(1))) |
1559 | 354 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 362 | self._toggle_bookmark_folder("NobleGas") |
1560 | 355 | folder_delegate)), | 363 | folder_delegate = folders.get_folder_delegate("NobleGas") |
1561 | 356 | Eventually(Equals(1))) | 364 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1562 | 365 | folder_delegate)), | ||
1563 | 366 | Eventually(Equals(1))) | ||
1564 | 367 | |||
1565 | 368 | def test_collapsed_bookmarks_folders_when_expanded(self): | ||
1566 | 369 | more_button = self.new_tab_view.get_bookmarks_more_button() | ||
1567 | 370 | self.assertThat(more_button.visible, Equals(True)) | ||
1568 | 371 | self.pointing_device.click_object(more_button) | ||
1569 | 372 | folders = self.new_tab_view.get_bookmarks_folder_list_view() | ||
1570 | 373 | self.assertThat(lambda: len(folders.get_delegates()), | ||
1571 | 374 | Eventually(Equals(3))) | ||
1572 | 375 | folder_delegate = folders.get_folder_delegate("") | ||
1573 | 376 | self.assertThat(lambda: len(folders.get_urls_from_folder( | ||
1574 | 377 | folder_delegate)), | ||
1575 | 378 | Eventually(Equals(5))) | ||
1576 | 379 | folder_delegate = folders.get_folder_delegate("Actinide") | ||
1577 | 380 | self.assertThat(lambda: len(folders.get_urls_from_folder( | ||
1578 | 381 | folder_delegate)), | ||
1579 | 382 | Eventually(Equals(0))) | ||
1580 | 383 | folder_delegate = folders.get_folder_delegate("NobleGas") | ||
1581 | 384 | self.assertThat(lambda: len(folders.get_urls_from_folder( | ||
1582 | 385 | folder_delegate)), | ||
1583 | 386 | Eventually(Equals(0))) | ||
1584 | 357 | 387 | ||
1585 | 358 | def test_hide_empty_bookmarks_folders_when_expanded(self): | 388 | def test_hide_empty_bookmarks_folders_when_expanded(self): |
1586 | 359 | more_button = self.new_tab_view.get_bookmarks_more_button() | 389 | more_button = self.new_tab_view.get_bookmarks_more_button() |
1587 | @@ -362,6 +392,7 @@ | |||
1588 | 362 | folders = self.new_tab_view.get_bookmarks_folder_list_view() | 392 | folders = self.new_tab_view.get_bookmarks_folder_list_view() |
1589 | 363 | self.assertThat(lambda: len(folders.get_delegates()), | 393 | self.assertThat(lambda: len(folders.get_delegates()), |
1590 | 364 | Eventually(Equals(3))) | 394 | Eventually(Equals(3))) |
1591 | 395 | self._toggle_bookmark_folder("Actinide") | ||
1592 | 365 | folder_delegate = folders.get_folder_delegate("Actinide") | 396 | folder_delegate = folders.get_folder_delegate("Actinide") |
1593 | 366 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 397 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1594 | 367 | folder_delegate)), | 398 | folder_delegate)), |
1595 | @@ -372,7 +403,8 @@ | |||
1596 | 372 | folder_delegate = folders.get_folder_delegate("") | 403 | folder_delegate = folders.get_folder_delegate("") |
1597 | 373 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 404 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1598 | 374 | folder_delegate)), | 405 | folder_delegate)), |
1600 | 375 | Eventually(Equals(4))) | 406 | Eventually(Equals(5))) |
1601 | 407 | self._toggle_bookmark_folder("NobleGas") | ||
1602 | 376 | folder_delegate = folders.get_folder_delegate("NobleGas") | 408 | folder_delegate = folders.get_folder_delegate("NobleGas") |
1603 | 377 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 409 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1604 | 378 | folder_delegate)), | 410 | folder_delegate)), |
1605 | @@ -388,7 +420,7 @@ | |||
1606 | 388 | folder_delegate = folders.get_folder_delegate("") | 420 | folder_delegate = folders.get_folder_delegate("") |
1607 | 389 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 421 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1608 | 390 | folder_delegate)), | 422 | folder_delegate)), |
1610 | 391 | Eventually(Equals(4))) | 423 | Eventually(Equals(5))) |
1611 | 392 | self.pointing_device.click_object( | 424 | self.pointing_device.click_object( |
1612 | 393 | folders.get_header_from_folder(folder_delegate)) | 425 | folders.get_header_from_folder(folder_delegate)) |
1613 | 394 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 426 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1614 | @@ -398,7 +430,7 @@ | |||
1615 | 398 | folders.get_header_from_folder(folder_delegate)) | 430 | folders.get_header_from_folder(folder_delegate)) |
1616 | 399 | self.assertThat(lambda: len(folders.get_urls_from_folder( | 431 | self.assertThat(lambda: len(folders.get_urls_from_folder( |
1617 | 400 | folder_delegate)), | 432 | folder_delegate)), |
1619 | 401 | Eventually(Equals(4))) | 433 | Eventually(Equals(5))) |
1620 | 402 | 434 | ||
1621 | 403 | def test_remove_top_sites(self): | 435 | def test_remove_top_sites(self): |
1622 | 404 | top_sites = self.new_tab_view.get_top_sites_list() | 436 | top_sites = self.new_tab_view.get_top_sites_list() |
1623 | 405 | 437 | ||
1624 | === added file 'tests/unittests/qml/tst_BookmarksFoldersViewWide.qml' | |||
1625 | --- tests/unittests/qml/tst_BookmarksFoldersViewWide.qml 1970-01-01 00:00:00 +0000 | |||
1626 | +++ tests/unittests/qml/tst_BookmarksFoldersViewWide.qml 2015-10-16 15:16:36 +0000 | |||
1627 | @@ -0,0 +1,257 @@ | |||
1628 | 1 | /* | ||
1629 | 2 | * Copyright 2015 Canonical Ltd. | ||
1630 | 3 | * | ||
1631 | 4 | * This file is part of webbrowser-app. | ||
1632 | 5 | * | ||
1633 | 6 | * webbrowser-app is free software; you can redistribute it and/or modify | ||
1634 | 7 | * it under the terms of the GNU General Public License as published by | ||
1635 | 8 | * the Free Software Foundation; version 3. | ||
1636 | 9 | * | ||
1637 | 10 | * webbrowser-app is distributed in the hope that it will be useful, | ||
1638 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1639 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1640 | 13 | * GNU General Public License for more details. | ||
1641 | 14 | * | ||
1642 | 15 | * You should have received a copy of the GNU General Public License | ||
1643 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1644 | 17 | */ | ||
1645 | 18 | |||
1646 | 19 | import QtQuick 2.4 | ||
1647 | 20 | import QtTest 1.0 | ||
1648 | 21 | import Ubuntu.Test 1.0 | ||
1649 | 22 | import "../../../src/app/webbrowser" | ||
1650 | 23 | import webbrowserapp.private 0.1 | ||
1651 | 24 | |||
1652 | 25 | Item { | ||
1653 | 26 | id: root | ||
1654 | 27 | |||
1655 | 28 | width: 800 | ||
1656 | 29 | height: 600 | ||
1657 | 30 | |||
1658 | 31 | Component { | ||
1659 | 32 | id: bookmarksModel | ||
1660 | 33 | BookmarksModel { | ||
1661 | 34 | databasePath: ":memory:" | ||
1662 | 35 | } | ||
1663 | 36 | } | ||
1664 | 37 | |||
1665 | 38 | property BookmarksFoldersViewWide view | ||
1666 | 39 | property var bookmarks | ||
1667 | 40 | property string homepage: "http://example.com/homepage" | ||
1668 | 41 | |||
1669 | 42 | Component { | ||
1670 | 43 | id: viewComponent | ||
1671 | 44 | BookmarksFoldersViewWide { | ||
1672 | 45 | anchors.fill: parent | ||
1673 | 46 | homeBookmarkUrl: homepage | ||
1674 | 47 | model: bookmarks | ||
1675 | 48 | } | ||
1676 | 49 | } | ||
1677 | 50 | |||
1678 | 51 | SignalSpy { | ||
1679 | 52 | id: bookmarkClickedSpy | ||
1680 | 53 | signalName: "bookmarkClicked" | ||
1681 | 54 | } | ||
1682 | 55 | |||
1683 | 56 | SignalSpy { | ||
1684 | 57 | id: bookmarkRemovedSpy | ||
1685 | 58 | signalName: "bookmarkRemoved" | ||
1686 | 59 | } | ||
1687 | 60 | |||
1688 | 61 | UbuntuTestCase { | ||
1689 | 62 | name: "BookmarksFoldersViewWide" | ||
1690 | 63 | when: windowShown | ||
1691 | 64 | |||
1692 | 65 | function init() { | ||
1693 | 66 | bookmarks = bookmarksModel.createObject() | ||
1694 | 67 | view = viewComponent.createObject(root) | ||
1695 | 68 | populate() | ||
1696 | 69 | |||
1697 | 70 | view.focus = true | ||
1698 | 71 | |||
1699 | 72 | bookmarkClickedSpy.target = view | ||
1700 | 73 | bookmarkClickedSpy.clear() | ||
1701 | 74 | bookmarkRemovedSpy.target = view | ||
1702 | 75 | bookmarkRemovedSpy.clear() | ||
1703 | 76 | } | ||
1704 | 77 | |||
1705 | 78 | function populate() { | ||
1706 | 79 | bookmarks.add("http://example.com", "Example Com", "", "") | ||
1707 | 80 | bookmarks.add("http://example.org/bar", "Example Org Bar", "", "Folder B") | ||
1708 | 81 | bookmarks.add("http://example.org/foo", "Example Org Foo", "", "Folder B") | ||
1709 | 82 | bookmarks.add("http://example.net/a", "Example Net A", "", "Folder A") | ||
1710 | 83 | bookmarks.add("http://example.net/b", "Example Net B", "", "Folder A") | ||
1711 | 84 | } | ||
1712 | 85 | |||
1713 | 86 | function cleanup() { | ||
1714 | 87 | bookmarks.destroy() | ||
1715 | 88 | bookmarks = null | ||
1716 | 89 | |||
1717 | 90 | view.destroy() | ||
1718 | 91 | view = null | ||
1719 | 92 | } | ||
1720 | 93 | |||
1721 | 94 | function clickItem(item) { | ||
1722 | 95 | var center = centerOf(item) | ||
1723 | 96 | mouseClick(item, center.x, center.y) | ||
1724 | 97 | } | ||
1725 | 98 | |||
1726 | 99 | function getListItems(name, itemName) { | ||
1727 | 100 | var list = findChild(view, name) | ||
1728 | 101 | var items = [] | ||
1729 | 102 | if (list) { | ||
1730 | 103 | // ensure all the delegates are created | ||
1731 | 104 | list.cacheBuffer = list.count * 1000 | ||
1732 | 105 | |||
1733 | 106 | // In some cases the ListView might add other children to the | ||
1734 | 107 | // contentItem, so we filter the list of children to include | ||
1735 | 108 | // only actual delegates | ||
1736 | 109 | var children = list.contentItem.children | ||
1737 | 110 | for (var i = 0; i < children.length; i++) { | ||
1738 | 111 | if (children[i].objectName === itemName) { | ||
1739 | 112 | items.push(children[i]) | ||
1740 | 113 | } | ||
1741 | 114 | } | ||
1742 | 115 | } | ||
1743 | 116 | return items | ||
1744 | 117 | } | ||
1745 | 118 | |||
1746 | 119 | function test_folder_list() { | ||
1747 | 120 | var items = getListItems("foldersList", "folderItem") | ||
1748 | 121 | compare(items.length, 3) | ||
1749 | 122 | verify(items[0].isAllBookmarksFolder) | ||
1750 | 123 | compare(items[0].model.folder, "") | ||
1751 | 124 | // named folder items should appear alphabetically sorted | ||
1752 | 125 | compare(items[1].model.folder, "Folder A") | ||
1753 | 126 | compare(items[2].model.folder, "Folder B") | ||
1754 | 127 | } | ||
1755 | 128 | |||
1756 | 129 | function test_all_bookmarks_list() { | ||
1757 | 130 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1758 | 131 | compare(items.length, 2) | ||
1759 | 132 | compare(items[0].url, homepage) | ||
1760 | 133 | compare(items[1].title, "Example Com") | ||
1761 | 134 | } | ||
1762 | 135 | |||
1763 | 136 | function test_navigate_folders_by_keyboard() { | ||
1764 | 137 | var foldersList = getListItems(view, "foldersList") | ||
1765 | 138 | var folders = getListItems("foldersList", "folderItem") | ||
1766 | 139 | verify(folders[0].isActiveFolder) | ||
1767 | 140 | |||
1768 | 141 | keyClick(Qt.Key_Down) | ||
1769 | 142 | verify(!folders[0].isActiveFolder) | ||
1770 | 143 | verify(folders[1].isActiveFolder) | ||
1771 | 144 | |||
1772 | 145 | // bookmarks within a folder are sorted with the first bookmarked appearing last | ||
1773 | 146 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1774 | 147 | compare(items[0].title, "Example Net B") | ||
1775 | 148 | compare(items[1].title, "Example Net A") | ||
1776 | 149 | compare(items.length, 2) | ||
1777 | 150 | |||
1778 | 151 | keyClick(Qt.Key_Down) | ||
1779 | 152 | verify(folders[2].isActiveFolder) | ||
1780 | 153 | items = getListItems("bookmarksList", "bookmarkItem") | ||
1781 | 154 | compare(items[0].title, "Example Org Foo") | ||
1782 | 155 | compare(items[1].title, "Example Org Bar") | ||
1783 | 156 | compare(items.length, 2) | ||
1784 | 157 | |||
1785 | 158 | // verify scrolling beyond bottom of list is not allowed | ||
1786 | 159 | keyClick(Qt.Key_Down) | ||
1787 | 160 | verify(folders[2].isActiveFolder) | ||
1788 | 161 | |||
1789 | 162 | keyClick(Qt.Key_Up) | ||
1790 | 163 | verify(folders[1].isActiveFolder) | ||
1791 | 164 | keyClick(Qt.Key_Up) | ||
1792 | 165 | verify(folders[0].isActiveFolder) | ||
1793 | 166 | |||
1794 | 167 | keyClick(Qt.Key_Up) | ||
1795 | 168 | } | ||
1796 | 169 | |||
1797 | 170 | function test_switch_between_folder_and_bookmarks_by_keyboard() { | ||
1798 | 171 | var foldersList = findChild(view, "foldersList") | ||
1799 | 172 | var bookmarks = findChild(view, "bookmarksList") | ||
1800 | 173 | var folders = getListItems("foldersList", "folderItem") | ||
1801 | 174 | |||
1802 | 175 | verify(folders[0].isActiveFolder) | ||
1803 | 176 | |||
1804 | 177 | keyClick(Qt.Key_Right) | ||
1805 | 178 | verify(bookmarks.activeFocus) | ||
1806 | 179 | keyClick(Qt.Key_Right) | ||
1807 | 180 | verify(bookmarks.activeFocus) // verify no circular scrolling | ||
1808 | 181 | |||
1809 | 182 | keyClick(Qt.Key_Left) | ||
1810 | 183 | verify(foldersList.activeFocus) | ||
1811 | 184 | keyClick(Qt.Key_Left) | ||
1812 | 185 | verify(foldersList.activeFocus) // verify no circular scrolling | ||
1813 | 186 | |||
1814 | 187 | keyClick(Qt.Key_Down) | ||
1815 | 188 | verify(!folders[0].isActiveFolder) | ||
1816 | 189 | verify(folders[1].isActiveFolder) | ||
1817 | 190 | |||
1818 | 191 | keyClick(Qt.Key_Right) | ||
1819 | 192 | verify(bookmarks.activeFocus) | ||
1820 | 193 | keyClick(Qt.Key_Right) | ||
1821 | 194 | verify(bookmarks.activeFocus) // verify no circular scrolling | ||
1822 | 195 | |||
1823 | 196 | keyClick(Qt.Key_Left) | ||
1824 | 197 | verify(foldersList.activeFocus) | ||
1825 | 198 | keyClick(Qt.Key_Left) | ||
1826 | 199 | verify(foldersList.activeFocus) // verify no circular scrolling | ||
1827 | 200 | } | ||
1828 | 201 | |||
1829 | 202 | function test_activate_bookmarks_by_keyboard() { | ||
1830 | 203 | keyClick(Qt.Key_Right) | ||
1831 | 204 | |||
1832 | 205 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1833 | 206 | keyClick(Qt.Key_Return) | ||
1834 | 207 | compare(bookmarkClickedSpy.count, 1) | ||
1835 | 208 | compare(bookmarkClickedSpy.signalArguments[0][0], homepage) | ||
1836 | 209 | |||
1837 | 210 | keyClick(Qt.Key_Down) | ||
1838 | 211 | keyClick(Qt.Key_Return) | ||
1839 | 212 | compare(bookmarkClickedSpy.count, 2) | ||
1840 | 213 | compare(bookmarkClickedSpy.signalArguments[1][0], "http://example.com") | ||
1841 | 214 | } | ||
1842 | 215 | |||
1843 | 216 | function test_activate_bookmarks_by_mouse() { | ||
1844 | 217 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1845 | 218 | clickItem(items[0]) | ||
1846 | 219 | compare(bookmarkClickedSpy.count, 1) | ||
1847 | 220 | compare(bookmarkClickedSpy.signalArguments[0][0], homepage) | ||
1848 | 221 | |||
1849 | 222 | clickItem(items[1]) | ||
1850 | 223 | compare(bookmarkClickedSpy.count, 2) | ||
1851 | 224 | compare(bookmarkClickedSpy.signalArguments[1][0], "http://example.com") | ||
1852 | 225 | } | ||
1853 | 226 | |||
1854 | 227 | function test_switch_folders_by_mouse() { | ||
1855 | 228 | var folders = getListItems("foldersList", "folderItem") | ||
1856 | 229 | |||
1857 | 230 | clickItem(folders[1]) | ||
1858 | 231 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1859 | 232 | compare(items[0].title, "Example Net B") | ||
1860 | 233 | compare(items[1].title, "Example Net A") | ||
1861 | 234 | compare(items.length, 2) | ||
1862 | 235 | |||
1863 | 236 | clickItem(folders[0]) | ||
1864 | 237 | items = getListItems("bookmarksList", "bookmarkItem") | ||
1865 | 238 | compare(items[0].url, homepage) | ||
1866 | 239 | compare(items[1].title, "Example Com") | ||
1867 | 240 | compare(items.length, 2) | ||
1868 | 241 | } | ||
1869 | 242 | |||
1870 | 243 | function test_remove_bookmarks_by_keyboard() { | ||
1871 | 244 | keyClick(Qt.Key_Right) | ||
1872 | 245 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1873 | 246 | |||
1874 | 247 | // verify that trying to delete the homepage bookmark does not work | ||
1875 | 248 | keyClick(Qt.Key_Delete) | ||
1876 | 249 | compare(bookmarkRemovedSpy.count, 0) | ||
1877 | 250 | |||
1878 | 251 | keyClick(Qt.Key_Down) | ||
1879 | 252 | keyClick(Qt.Key_Delete) | ||
1880 | 253 | compare(bookmarkRemovedSpy.count, 1) | ||
1881 | 254 | compare(bookmarkRemovedSpy.signalArguments[0][0], items[1].url) | ||
1882 | 255 | } | ||
1883 | 256 | } | ||
1884 | 257 | } | ||
1885 | 0 | 258 | ||
1886 | === modified file 'tests/unittests/qml/tst_NewTabViewWide.qml' | |||
1887 | --- tests/unittests/qml/tst_NewTabViewWide.qml 2015-09-10 11:29:53 +0000 | |||
1888 | +++ tests/unittests/qml/tst_NewTabViewWide.qml 2015-10-16 15:16:36 +0000 | |||
1889 | @@ -161,23 +161,6 @@ | |||
1890 | 161 | } | 161 | } |
1891 | 162 | } | 162 | } |
1892 | 163 | 163 | ||
1893 | 164 | function test_folder_list() { | ||
1894 | 165 | var items = getListItems("foldersList", "folderItem") | ||
1895 | 166 | compare(items.length, 3) | ||
1896 | 167 | verify(items[0].isAllBookmarksFolder) | ||
1897 | 168 | compare(items[0].model.folder, "") | ||
1898 | 169 | // named folder items should appear alphabetically sorted | ||
1899 | 170 | compare(items[1].model.folder, "Folder A") | ||
1900 | 171 | compare(items[2].model.folder, "Folder B") | ||
1901 | 172 | } | ||
1902 | 173 | |||
1903 | 174 | function test_all_bookmarks_list() { | ||
1904 | 175 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1905 | 176 | compare(items.length, 2) | ||
1906 | 177 | compare(items[0].url, homepage) | ||
1907 | 178 | compare(items[1].title, "Example Com") | ||
1908 | 179 | } | ||
1909 | 180 | |||
1910 | 181 | function test_switch_sections_by_keyboard() { | 164 | function test_switch_sections_by_keyboard() { |
1911 | 182 | skip("Would fail due to UITK bug: http://pad.lv/1481233") | 165 | skip("Would fail due to UITK bug: http://pad.lv/1481233") |
1912 | 183 | var sections = findChild(view, "sections") | 166 | var sections = findChild(view, "sections") |
1913 | @@ -232,75 +215,6 @@ | |||
1914 | 232 | compare(historyEntryClickedSpy.signalArguments[1][0], "http://example.org") | 215 | compare(historyEntryClickedSpy.signalArguments[1][0], "http://example.org") |
1915 | 233 | } | 216 | } |
1916 | 234 | 217 | ||
1917 | 235 | function test_navigate_folders_by_keyboard() { | ||
1918 | 236 | goToBookmarks() | ||
1919 | 237 | |||
1920 | 238 | var foldersList = getListItems(view, "foldersList") | ||
1921 | 239 | var folders = getListItems("foldersList", "folderItem") | ||
1922 | 240 | verify(folders[0].isActiveFolder) | ||
1923 | 241 | |||
1924 | 242 | keyClick(Qt.Key_Down) | ||
1925 | 243 | verify(!folders[0].isActiveFolder) | ||
1926 | 244 | verify(folders[1].isActiveFolder) | ||
1927 | 245 | |||
1928 | 246 | // bookmarks within a folder are sorted with the first bookmarked appearing last | ||
1929 | 247 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1930 | 248 | compare(items[0].title, "Example Net B") | ||
1931 | 249 | compare(items[1].title, "Example Net A") | ||
1932 | 250 | compare(items.length, 2) | ||
1933 | 251 | |||
1934 | 252 | keyClick(Qt.Key_Down) | ||
1935 | 253 | verify(folders[2].isActiveFolder) | ||
1936 | 254 | items = getListItems("bookmarksList", "bookmarkItem") | ||
1937 | 255 | compare(items[0].title, "Example Org Foo") | ||
1938 | 256 | compare(items[1].title, "Example Org Bar") | ||
1939 | 257 | compare(items.length, 2) | ||
1940 | 258 | |||
1941 | 259 | // verify scrolling beyond bottom of list is not allowed | ||
1942 | 260 | keyClick(Qt.Key_Down) | ||
1943 | 261 | verify(folders[2].isActiveFolder) | ||
1944 | 262 | |||
1945 | 263 | keyClick(Qt.Key_Up) | ||
1946 | 264 | verify(folders[1].isActiveFolder) | ||
1947 | 265 | keyClick(Qt.Key_Up) | ||
1948 | 266 | verify(folders[0].isActiveFolder) | ||
1949 | 267 | |||
1950 | 268 | keyClick(Qt.Key_Up) | ||
1951 | 269 | compare(releasingKeyboardFocusSpy.count, 1) | ||
1952 | 270 | } | ||
1953 | 271 | |||
1954 | 272 | function test_switch_between_folder_and_bookmarks_by_keyboard() { | ||
1955 | 273 | goToBookmarks() | ||
1956 | 274 | |||
1957 | 275 | var folders = findChild(view, "foldersList") | ||
1958 | 276 | var bookmarks = findChild(view, "bookmarksList") | ||
1959 | 277 | |||
1960 | 278 | keyClick(Qt.Key_Right) | ||
1961 | 279 | verify(bookmarks.activeFocus) | ||
1962 | 280 | keyClick(Qt.Key_Right) | ||
1963 | 281 | verify(bookmarks.activeFocus) // verify no circular scrolling | ||
1964 | 282 | |||
1965 | 283 | keyClick(Qt.Key_Left) | ||
1966 | 284 | verify(folders.activeFocus) | ||
1967 | 285 | keyClick(Qt.Key_Left) | ||
1968 | 286 | verify(folders.activeFocus) // verify no circular scrolling | ||
1969 | 287 | } | ||
1970 | 288 | |||
1971 | 289 | function test_activate_bookmarks_by_keyboard() { | ||
1972 | 290 | goToBookmarks() | ||
1973 | 291 | keyClick(Qt.Key_Right) | ||
1974 | 292 | |||
1975 | 293 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1976 | 294 | keyClick(Qt.Key_Return) | ||
1977 | 295 | compare(bookmarkClickedSpy.count, 1) | ||
1978 | 296 | compare(bookmarkClickedSpy.signalArguments[0][0], homepage) | ||
1979 | 297 | |||
1980 | 298 | keyClick(Qt.Key_Down) | ||
1981 | 299 | keyClick(Qt.Key_Return) | ||
1982 | 300 | compare(bookmarkClickedSpy.count, 2) | ||
1983 | 301 | compare(bookmarkClickedSpy.signalArguments[1][0], "http://example.com") | ||
1984 | 302 | } | ||
1985 | 303 | |||
1986 | 304 | function test_activate_topsites_by_mouse() { | 218 | function test_activate_topsites_by_mouse() { |
1987 | 305 | var items = getListItems("topSitesList", "topSiteItem") | 219 | var items = getListItems("topSitesList", "topSiteItem") |
1988 | 306 | clickItem(items[0]) | 220 | clickItem(items[0]) |
1989 | @@ -313,50 +227,6 @@ | |||
1990 | 313 | 227 | ||
1991 | 314 | } | 228 | } |
1992 | 315 | 229 | ||
1993 | 316 | function test_activate_bookmarks_by_mouse() { | ||
1994 | 317 | goToBookmarks() | ||
1995 | 318 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
1996 | 319 | clickItem(items[0]) | ||
1997 | 320 | compare(bookmarkClickedSpy.count, 1) | ||
1998 | 321 | compare(bookmarkClickedSpy.signalArguments[0][0], homepage) | ||
1999 | 322 | |||
2000 | 323 | clickItem(items[1]) | ||
2001 | 324 | compare(bookmarkClickedSpy.count, 2) | ||
2002 | 325 | compare(bookmarkClickedSpy.signalArguments[1][0], "http://example.com") | ||
2003 | 326 | } | ||
2004 | 327 | |||
2005 | 328 | function test_switch_folders_by_mouse() { | ||
2006 | 329 | goToBookmarks() | ||
2007 | 330 | var folders = getListItems("foldersList", "folderItem") | ||
2008 | 331 | |||
2009 | 332 | clickItem(folders[1]) | ||
2010 | 333 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
2011 | 334 | compare(items[0].title, "Example Net B") | ||
2012 | 335 | compare(items[1].title, "Example Net A") | ||
2013 | 336 | compare(items.length, 2) | ||
2014 | 337 | |||
2015 | 338 | clickItem(folders[0]) | ||
2016 | 339 | items = getListItems("bookmarksList", "bookmarkItem") | ||
2017 | 340 | compare(items[0].url, homepage) | ||
2018 | 341 | compare(items[1].title, "Example Com") | ||
2019 | 342 | compare(items.length, 2) | ||
2020 | 343 | } | ||
2021 | 344 | |||
2022 | 345 | function test_remove_bookmarks_by_keyboard() { | ||
2023 | 346 | goToBookmarks() | ||
2024 | 347 | keyClick(Qt.Key_Right) | ||
2025 | 348 | var items = getListItems("bookmarksList", "bookmarkItem") | ||
2026 | 349 | |||
2027 | 350 | // verify that trying to delete the homepage bookmark does not work | ||
2028 | 351 | keyClick(Qt.Key_Delete) | ||
2029 | 352 | compare(bookmarkRemovedSpy.count, 0) | ||
2030 | 353 | |||
2031 | 354 | keyClick(Qt.Key_Down) | ||
2032 | 355 | keyClick(Qt.Key_Delete) | ||
2033 | 356 | compare(bookmarkRemovedSpy.count, 1) | ||
2034 | 357 | compare(bookmarkRemovedSpy.signalArguments[0][0], items[1].url) | ||
2035 | 358 | } | ||
2036 | 359 | |||
2037 | 360 | function test_remove_top_sites_by_keyboard() { | 230 | function test_remove_top_sites_by_keyboard() { |
2038 | 361 | var previous = getListItems("topSitesList", "topSiteItem") | 231 | var previous = getListItems("topSitesList", "topSiteItem") |
2039 | 362 | keyClick(Qt.Key_Delete) | 232 | keyClick(Qt.Key_Delete) |
FAILED: Continuous integration, rev:1161 jenkins. qa.ubuntu. com/job/ webbrowser- app-ci/ 2212/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 4098/console jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- amd64-ci/ 966/console jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- armhf-ci/ 966/console jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- i386-ci/ 966/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 4095/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/webbrowser- app-ci/ 2212/rebuild
http://