-USING: io.pathnames tools.test ;
+USING: io.pathnames tools.test urls ;
IN: webbrowser
{ t } [ "http://reddit.com" url-string? ] unit-test
{ f } [ 123 url-string? ] unit-test
{ } [ "" absolute-path open-item ] unit-test
+{ } [ URL" http://www.google.com" open-item ] unit-test
! Copyright (C) 2011 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: io.pathnames kernel present system webbrowser windows.shell32
-windows.user32 ;
+USING: kernel present system webbrowser windows.shell32 windows.user32 ;
IN: webbrowser.windows
M: windows open-item ( item -- )
- absolute-path [ f "open" ] dip present f f
+ [ f "open" ] dip present f f
SW_SHOWNORMAL ShellExecute drop ;