github / Rebel

Cocoa framework for improving AppKit
Other
1.13k stars 111 forks source link

HTML view #73

Closed joshaber closed 11 years ago

joshaber commented 11 years ago

BECAUSE IT SHOULDN"T BE THIS HARD

joshaber commented 11 years ago

:+1: @aroben

dannygreg commented 11 years ago

Just a couple of queries.

jspahrsummers commented 11 years ago

Is there any way to unit test parts of this?

joshaber commented 11 years ago

Is there any way to unit test parts of this?

I'm open to suggestions but I don't see anything that could be.

joshaber commented 11 years ago

:wine_glass:

jspahrsummers commented 11 years ago

We could at least test:

  1. The HTML and CSS properties appear somewhere in the full page that the web view loads.
  2. The web view loads synchronously (i.e. test that flashing doesn't occur).
  3. URL handling.
joshaber commented 11 years ago

I'm not really sure how to test (2) or (3) in a unit test.

aroben commented 11 years ago

For (2) you can just check that -isLoading is NO after setting HTML or CSS.

jspahrsummers commented 11 years ago

@aroben Do you have any Protips™ on how we could do 2 or 3?

EDIT: Beaten to the :facepunch:.

joshaber commented 11 years ago

:boom: :sailboat:

aroben commented 11 years ago

(3) is pretty tricky to test. You could use JavaScript to click a link. But then NSWorkspace would get called, which seems bad.

joshaber commented 11 years ago

:boom: :ship:

jspahrsummers commented 11 years ago

:+1:

dannygreg commented 11 years ago

I'm :+1:, @aroben any last thoughts?

aroben commented 11 years ago

:shipit:

dannygreg commented 11 years ago

:boom: